-
-
September 29, 2017 at 9:26 am
bwide
SubscriberHi 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 conds
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.
That's what I want regardless of the number of objects
file 3)
here is the code that I did for a single file but I want it to automatically detect and test the conds that intersect and merge them since I have several different DXF files haven't the same number of conds.
Thank you. Help me please
file 2
file3
-
September 29, 2017 at 9:33 am
bwide
SubscriberThis is the 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 ("NAME
ptions", "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, ("NAME:LayerInfo", ("NAME:0", "source:=", _
"0", "display_source:=", "0", "import:=", true, "dest:=", "0", "dest_selected:=", _
false, "layer_type:=", "signal"), ("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 ("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"), ("NAME:UniteParameters", "KeepOriginals:=", _
false)
oEditor.Unite ("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"), ("NAME:UniteParameters", "KeepOriginals:=", _
false)
oEditor.Unite ("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"), ("NAME:UniteParameters", "KeepOriginals:=", _
false)
oEditor.Unite ("NAME:Selections", "Selections:=", _
"cond_16,cond_15,cond_33,cond_46"), ("NAME:UniteParameters", "KeepOriginals:=", _
false)
but the problem is in the command oEditor.Unite I want to make autoamtic selections since each time the numbers of conds is changed
-
- You must be logged in to reply to this topic.

Earth Rescue – An Ansys Online Series
The climate crisis is here. But so is the human ingenuity to fight it. Earth Rescue reveals what visionary companies are doing today to engineer radical new ideas in the fight against climate change. Click here to watch the first episode.

Ansys Blog
Subscribe to the Ansys Blog to get great new content about the power of simulation delivered right to your email on a weekly basis. With content from Ansys experts, partners and customers you will learn about product development advances, thought leadership and trends and tips to better use Ansys tools. Sign up here.
- simulation completed with execution error on server
- Signing up as ANSYS Support Coordinator
- How to export Ansys Maxwell simulation results for post-processing in matlab or in .csv file
- Maxwell, HFSS or Q3D?
- Error
- Unable to assign correctly the excitations in a coil
- Running ANSYS HFSS on the HPC (it runs on Linux only)
- Running ANSYS HFSS on multiple nodes on SLURM based cluster
- Intersect errors with model with complex structure
- Number of parallel paths in Ansys Maxwell
-
2642
-
2110
-
1335
-
1112
-
461
© 2023 Copyright ANSYS, Inc. All rights reserved.