'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