微波EDA网,见证研发工程师的成长!
首页 > 研发问答 > 微波和射频技术 > 电磁仿真讨论 > Get the Name of a 3D Component Library in a Script

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

时间:03-25 整理:3721RD 点击:
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.

Name:  HFSS Help Diagram.png
Views: 13
Size:  3.2 KB

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 thenDim oObjectNamesFor i = 0 To oNumObjects - 1	oObjectNames = oObjectNames & oEditor.GetObjectName(i) & ";"	'Start from 0NextMsgBox oObjectNames
End If
上一篇:HFSS error in lumbed port
下一篇:最后一页

Copyright © 2017-2020 微波EDA网 版权所有

网站地图

Top