HFSS擅长激励模式的单频点计算,但是如果想要利用场计算器计算多个频点的场值,手工算就比较麻烦了。
Dim oAnsoftApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModuleD
Dim oModule
dim topvalue
Set oFS = CreateObject("Scripting.FileSystemObject")
Set oAnsoftApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oAnsoftApp.GetAppDesktop()
oDesktop.RestoreWindow
Set oProject = oDesktop.SetActiveProject("lijinjie")
Set oDesign = oProject.SetActiveDesign("HFSSDesign1")
dim path
path="E:\temp1.txt"
Set ofile = oFS.CreateTextFile (path)
RI=Array("Real","Imag")
RT=Array("Rectangle1","Rectangle2")
value=Array("","","","")
for f=30 to 38 step 0.2
fre=CStr(f)+"GHz"
Set oModuleD = oDesign.GetModule("AnalysisSetup")
oModuleD.EditSetup "Setup1", Array("NAME:Setup1", "Fr