Changing the output format of HFSS?? (Please HELP!!!)

Status
Not open for further replies.

ryanma

Junior Member level 1
Joined
Sep 1, 2008
Messages
17
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,432
Dear all,
i want to know how can we change the output format of HFSS, i use the matlab to control the hfss through the vbscript, i want to change the output format, but i have no idea. The following is the vbscript. Please help!!


Dim oHfssApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule
Set oHfssApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oHfssApp.GetAppDesktop()
oDesktop.NewProject
Set oProject = oDesktop.GetActiveProject
oProject.InsertDesign "HFSS", "HFSSModel1", "DrivenModal", ""
Set oDesign = oProject.SetActiveDesign("HFSSModel1")
Set oEditor = oDesign.SetActiveEditor("3D Modeler")
oEditor.SetModelUnits Array("NAME:Units Parameter", "Units:=", "in", "Rescale:=", _
false)
oEditor.CreateBox Array("NAME:BoxParameters", "XPosition:=", "0in", "YPosition:=", _
"0in", "ZPosition:=", "0in", "XSize:=", "0.9in", "YSize:=", "2in", "ZSize:=", _
"0.4in"), Array("NAME:Attributes", "Name:=", "Box1", "Flags:=", "", "Color:=", _
"(132 132 193)", "Transparency:=", 0.9, "PartCoordinateSystem:=", _
"Global", "MaterialName:=", "vacuum", "SolveInside:=", true)
oDesign.ChangeProperty Array("NAME:AllTabs", Array("NAME:LocalVariableTab", Array("NAMEropServers", _
"LocalVariables"), Array("NAME:NewProps", Array("NAME:wg_y", "PropType:=", "VariableProp", "UserDef:=", _
true, "Value:=", "1in"))))
oEditor.ChangeProperty Array("NAME:AllTabs", Array("NAME:Geometry3DCmdTab", Array("NAMEropServers", _
"Box1:CreateBox:1"), Array("NAME:ChangedProps", Array("NAME:YSize", "Value:=", "wg_y"))))
Set oModule = oDesign.GetModule("BoundarySetup")
oModule.AssignWavePort Array("NAME:WavePort1", "NumModes:=", 1, "PolarizeEField:=", _
false, "DoDeembed:=", false, "DoRenorm:=", false, Array("NAME:Modes", Array("NAME:Mode1", "ModeNum:=", _
1, "UseIntLine:=", true, Array("NAME:IntLine", "Start:=", Array("0.45in", "0in", _
"0in"), "End:=", Array("0.45in", "0in", "0.4in")), "CharImp:=", "Zpi")), "Faces:=", Array( _
9))
oModule.AssignWavePort Array("NAME:WavePort2", "NumModes:=", 1, "PolarizeEField:=", _
false, "DoDeembed:=", false, "DoRenorm:=", false, Array("NAME:Modes", Array("NAME:Mode1", "ModeNum:=", _
1, "UseIntLine:=", true, Array("NAME:IntLine", "Start:=", Array("0.45in", "1in", _
"0in"), "End:=", Array("0.45in", "1in", "0.4in")), "CharImp:=", "Zpi")), "Faces:=", Array( _
11))
Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", Array("NAME:Setup1", "Frequency:=", "10GHz", "PortsOnly:=", _
false, "MaxDeltaS:=", 0.01, "UseMatrixConv:=", false, "MaximumPasses:=", 5, "MinimumPasses:=", _
1, "MinimumConvergedPasses:=", 1, "PercentRefinement:=", 20, "ReducedSolutionBasis:=", _
false, "DoLambdaRefine:=", true, "DoMaterialLambda:=", true, "Target:=", _
0.3333, "PortAccuracy:=", 1, "SetPortMinMaxTri:=", false)
oDesign.ChangeProperty Array("NAME:AllTabs", Array("NAME:LocalVariableTab", Array("NAMEropServers", _
"LocalVariables"), Array("NAME:ChangedProps", Array("NAME:wg_y", "Value:=", "2in"))))
oProject.SaveAs "E:\FYP\xband_wg_script.hfss", true
oDesign.Solve Array("Setup1")
Set oModule = oDesign.GetModule("Solutions")
oModule.ExportNetworkData "wg_y=" & Chr(39) & "2in" & Chr(39) & "", Array( _
"Setup1:LastAdaptive"), 7, _
"E:\FYP\xband_wg_smatrix.m", Array("All"), false, 50
oProject.Save
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…