EagleForce
Newbie level 1
Hi,
I'm working on a VB .NET program which will automate creating HFSS models. The code looks something like this:
It's working fine except for 1 problem. When an HFSS window is already open, with CreateObject("AnsoftHfss.HfssScriptInterface") command oAnsoftApp refers to that HFSS window. If multiple HFSS windows are open, it refers to the 1st opened window. I want my tool to open a new HFSS window and apply scripts there w/o interfering w/ other HFSS windows. I tried using System.Diagnostics.Process.Start("C:\Program Files (x86)\Ansoft\HFSS13.0\hfss.exe") at the beginning to open a new window but had the same problem if another window is already open. I wonder if there is a way to choose a particular instance of HFSS.
Thanks,
EF
I'm working on a VB .NET program which will automate creating HFSS models. The code looks something like this:
Code:
Imports HFSSAppLib
Sub Main()
oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")
oDesktop = oAnsoftApp.GetAppDesktop()
oProject = oDesktop.NewProject
'Scripts here...
End Sub
It's working fine except for 1 problem. When an HFSS window is already open, with CreateObject("AnsoftHfss.HfssScriptInterface") command oAnsoftApp refers to that HFSS window. If multiple HFSS windows are open, it refers to the 1st opened window. I want my tool to open a new HFSS window and apply scripts there w/o interfering w/ other HFSS windows. I tried using System.Diagnostics.Process.Start("C:\Program Files (x86)\Ansoft\HFSS13.0\hfss.exe") at the beginning to open a new window but had the same problem if another window is already open. I wonder if there is a way to choose a particular instance of HFSS.
Thanks,
EF