Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

Importing 3D object, setting the delta parameter and adding infinite sphere in HFSS12

Status
Not open for further replies.

hn1

Advanced Member level 4
Joined
Oct 28, 2006
Messages
105
Helped
5
Reputation
10
Reaction score
0
Trophy points
1,296
Activity points
1,872
Hi,
I am new with scripting HFSS12. I wrote a script using the HFSS script pdf file and it was successful except 3 things:

1) I can not import a 3D object (stl file). My code for this part is as follows:

Dim oHfssApp
Dim oDesktop
Dim oProject
Dim oDesign
Dim oEditor
Dim oModule

Set oHfssApp = CreateObject("AnsoftHfss.HfssScriptInterface")
Set oDesktop = oHfssApp.GetAppDesktop()
oDesktop.RestoreWindow
oDesktop.NewProject
Set oProject = oDesktop.GetActiveProject

oProject.InsertDesign "HFSS", "first", "DrivenModal", ""
Set oDesign = oProject.SetActiveDesign("first")
Set oEditor = oDesign.SetActiveEditor("3D Modeler")

oEditor.Import _
Array("NAME:NativeBodyParameters", _
"CoordinateSystemID:=", -1, _
"HealOption:=", 0, _
"CheckModel:=", true, _
"Options:=", "", _
"FileType:=", "UnRecognized", _
"MaxStitchTol:=", 0.001, _
"SourceFile:=", "first.stl")

2) In the analysis part, I can not set the delta parameter. I set maxDeltaS to 0.02 but in the gui it is still 0.1.

Set oModule = oDesign.GetModule("AnalysisSetup")
oModule.InsertSetup "HfssDriven", _
Array("NAME:Setup400MHz", _
"Frequency:=", "0.400000GHz", _
"PortsOnly:=", false, _
"maxDeltaS:=", 0.020000, _
"UseMatrixConv:=", false, _
"MaximumPasses:=", 20, _
"MinimumPasses:=", 1, _
"MinimumConvergedPasses:=", 1, _
"PercentRefinement:=", 20, _
"ReducedSolutionBasis:=", false, _
"DoLambdaRefine:=", true, _
"DoMaterialLambda:=", true, _
"Target:=", 0.3333, _
"PortAccuracy:=", 2, _
"SetPortMinMaxTri:=", false)

3) I can not add an infinite sphere. I got an error massage for both of the following implementations.

oModule.EditFarFieldSphereSetup _
Array("NAME:InfSphere", _
"UseCustomRadiationSurface:=", true, _
"ThetaStart:=", "0deg", _
"ThetaStop:=", "180deg", _
"ThetaStep:=", "10deg", _
"PhiStart:=", "0deg", _
"PhiStop:=", "360deg", _
"PhiStep:=", "10deg", _
"UseLocalCS:=", false)

--------

oModule.InsertFarFieldSphereSetup Array("NAME:InfiniteSphere1", _
"UseCustomRadiationSurface:=", false, _
"ThetaStart:=", "0deg",_
"ThetaStop:=", "180deg",_
"ThetaStep:=", "10deg",_
"PhiStart:=", "0deg",_
"PhiStop:=", "36deg",_
"PhiStep:=", "10deg",_
"UseLocalCS:=", true,_
"CoordSystem:=", "RelativeCS1")

thanks,
hn1
 

HFSS script problem

according to my experience, the most efficient way to write the scripts is: you use the record script function first. then edit the recorded script
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top