CFD Online Logo CFD Online URL
www.cfd-online.com
[Sponsors]
Home > Forums > Software User Forums > ANSYS

VBScripting in ANSYS Q3D extractor

Register Blogs Members List Search Today's Posts Mark Forums Read

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old   September 15, 2017, 03:46
Default VBScripting in ANSYS Q3D extractor
  #1
New Member
 
belloumiwided
Join Date: Sep 2017
Posts: 1
Rep Power: 0
bwide is on a distinguished road
Hi Everyone,
I'm trying to write a VBScript for Ansys q3d extractor .I have a DXF file that I wanted to import it into Ansys Q3D extractor, each time this file is changed in terms of number of polylines
for example: file1
when I import it into the Ansys Q3d extractor software I got 69 cond
file 2
when I import it into Q3d extractor I got 72 cond
so I would like to know how to merge the objects that intersect automatically because each time the number of objects changes from one file to another.
This my code
Code:
Dim oAnsoftApp
   Dim oDesktop
   Dim oProject
   Dim oDesign
   Dim oEditor
   Dim oModule
   Set oAnsoftApp = CreateObject("Q3DExtractor.ScriptInterface")
   Set oDesktop = oAnsoftApp.GetAppDesktop()    
   oDesktop.NewProject    
   Set oProject = oDesktop.GetActiveProject
   oProject.InsertDesign "Q3D Extractor", "Q3DDesign1", "", ""    
   Set oDesign = oProject.SetActiveDesign("Q3DDesign1")
   Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.ImportDXF Array("NAME:options", "FileName:=",  _
  "C:/Users/jawhar/Desktop/dfg/wi3.dxf", "Scale:=", 0.001, "AutoDetectClosed:=",  _
  true, "SelfStitch:=", true, "DefeatureGeometry:=", false, "DefeatureDistance:=",  _
  0, "RoundCoordinates:=", false, "RoundNumDigits:=", 4, "WritePolyWithWidthAsFilledPoly:=",  _
  false, "ImportMethod:=", 1, "2DSheetBodies:=", false, Array("NAME:LayerInfo", Array("NAME:0", "source:=",  _
  "0", "display_source:=", "0", "import:=", true, "dest:=", "0", "dest_selected:=",  _
  false, "layer_type:=", "signal"), Array("NAME:cond", "source:=", "cond", "display_source:=",  _
  "cond", "import:=", true, "dest:=", "cond", "dest_selected:=", false, "layer_type:=",  _
  "signal")))
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.Unite Array("NAME:Selections", "Selections:=",  _
  "cond_1,cond_2,cond_3,cond_26,cond_27,cond_39,cond_40,cond_52,cond_59,cond_60,c" & _ 
  "ond_4,cond_5,cond_28,cond_41,cond_53,cond_7,cond_29,cond_30,cond_42,cond_61,co" & _ 
  "nd_9,cond_8,cond_43,cond_6,cond_54"), Array("NAME:UniteParameters", "KeepOriginals:=",  _
  false)
oEditor.Unite Array("NAME:Selections", "Selections:=",  _
  "cond_18,cond_19,cond_34,cond_35,cond_47,cond_48,cond_57,cond_64,cond_17,cond_2" & _ 
  "0,cond_21,cond_58,cond_67,cond_36,cond_49,cond_22,cond_65,cond_69,cond_38,cond" & _ 
  "_51,cond_25,cond_24,cond_23,cond_50,cond_37"), Array("NAME:UniteParameters", "KeepOriginals:=",  _
  false)
oEditor.Unite Array("NAME:Selections", "Selections:=",  _
  "cond_31,cond_44,cond_10,cond_11,cond_12,cond_13,cond_14,cond_32,cond_45,cond_5" & _ 
  "6,cond_63,cond_66,cond_68,cond_55,cond_62"), Array("NAME:UniteParameters", "KeepOriginals:=",  _
  false)
oEditor.Unite Array("NAME:Selections", "Selections:=",  _
  "cond_16,cond_15,cond_33,cond_46"), Array("NAME:UniteParameters", "KeepOriginals:=",  _
  false)
That's what I want regardless of the number of objects :file 3
file1.PNG

file2.PNG

file3.PNG
Thank you for your help
bwide is offline   Reply With Quote

Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Running Ansys in BAtch Mode kuleuvenstudent ANSYS 1 October 18, 2017 12:11
[ANSYS Meshing] ANSYS mesh - I was surprised... assafwei ANSYS Meshing & Geometry 0 September 4, 2014 12:17
Ansys HPC licensing policy assafwei ANSYS 0 June 29, 2014 16:00
Using ICEM CFD to repair/edit ANSYS Meshing Kaaji1359 ANSYS 2 July 30, 2013 10:28
Exporting results from CFX to ANSYS ?? sohail ahmed CFX 1 December 20, 2007 01:10


All times are GMT -4. The time now is 22:57.