Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Get the Name of a 3D Component Library in a Script

Status
Not open for further replies.

Daniel Waseem

Newbie level 5
Newbie level 5
Joined
Sep 12, 2014
Messages
9
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
57
I am trying to retrieve the name of a 3D Component Library using a script in HFSS. I have tried to use GetObjectsInGroup("") with the name of the 3D Component Library, and that did not work.

In the attachment, I want to be able to get a list of the Solids and Sheets in "PartA1".

Thanks you in advance for the help.

HFSS Help Diagram.png
 

Code:
'Define variables==================================================================================
Dim oAnsoftApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule

Dim i

'Set script variables==============================================================================
Set oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oAnsoftApp.GetAppDesktop()
oDesktop.RestoreWindow

Set oProject = oDesktop.GetActiveProject()

Set oDesign = oProject.GetActiveDesign()


Set oEditor = oDesign.SetActiveEditor("3D Modeler")

'The number of objects in the design---------------------------------------------------------------
Dim oNumObjects
oNumObjects = oEditor.GetNumObjects			'Not include child objects attached to the parent object
MsgBox "Number of objects: " & oNumObjects	'nor united objected.

If oNumObjects >0 then
	Dim oObjectNames
	For i = 0 To oNumObjects - 1
		oObjectNames = oObjectNames & oEditor.GetObjectName(i) & ";"	'Start from 0
	Next
	MsgBox oObjectNames
End If
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top