fushq
Newbie level 4
I want to use HFSS API VBscript program to export the results to a file. But it doesn't work in HFSS10. It is said that the HFSS10 doesn't support the method "oDesign.ExportToFile". So how can i export the results to a file using the VBscript. I hope someone can give me a hint. Thank you so much.
Dim oHfssApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oHfssApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oHfssApp.GetAppDesktop()
oDesktop.RestoreWindow
oDesktop.OpenProject "E:/GPS.hfss"
Set oProject = oDesktop.GetActiveProject
Set oDesign = oProject.SetActiveDesign("GPS")
oDesign.CreateReport Array("NAME:SParam",_
"ReportType:=","Modal S Parameters",_
"DisplayType:=","Rectangular Plot", _
Array("NAME:Traces",_
Array("NAME:Trace1",_
"SolutionName:=","Setup1 : Sweep1",_
"Context:=","", _
"Freq:=", Array("All"), _
"XComponent:=", "freq",_
"YComponent:=", "db(S(p1,p1))",_
"YAxis:=",0)))
oDesign.ExportToFile "SParam", "E:\ssp.txt"
oProject.Save
Dim oHfssApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oHfssApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oHfssApp.GetAppDesktop()
oDesktop.RestoreWindow
oDesktop.OpenProject "E:/GPS.hfss"
Set oProject = oDesktop.GetActiveProject
Set oDesign = oProject.SetActiveDesign("GPS")
oDesign.CreateReport Array("NAME:SParam",_
"ReportType:=","Modal S Parameters",_
"DisplayType:=","Rectangular Plot", _
Array("NAME:Traces",_
Array("NAME:Trace1",_
"SolutionName:=","Setup1 : Sweep1",_
"Context:=","", _
"Freq:=", Array("All"), _
"XComponent:=", "freq",_
"YComponent:=", "db(S(p1,p1))",_
"YAxis:=",0)))
oDesign.ExportToFile "SParam", "E:\ssp.txt"
oProject.Save