- 易迪拓培训,专注于微波、射频、天线设计工程师的培养
HFSS15: Running a Script
To run a script from HFSS:
1. Click Tools>Run Script.
The Open dialog box appears.
2. Use the file browser to locate the folder in which you saved the script, and then double-click the folder’s name.
3. Type the name of the script in the File name text box, or click its name, and then click Open.
HFSS executes the script.
To supply script arguments when running from Tools>Run Script, use the edit field at the bottom of the file selection dialog. You can access the script arguments using the AnsoftScriptHost.arguments collection from vbscript. This is a standard COM collection.
To run a script from a command line, use:
-runscriptandexit or -runscript arguments to the HFSS command line syntax.
You can give -scriptargs parameter to the script and specify arguments.
If you run the script from DOS prompt as a .vbs file (that is, you don't launch HFSS, but just launch vbs directly, or use wscript.exe or cscript.exe), the arguments will be in the WSH.arguments collection, not the AnsoftScriptHost.arguments collection. To handle this, you can write this:
on error resume next
dim args
Set args = AnsoftScript.arguments
if(IsEmpty(args)) then
Set args = WSH.arguments
End if
on error goto 0
'At this point, args has the arguments no matter if you are running
'under windows script host or Ansoft script host
msgbox "Count is " & args.Count
for i = 0 to args.Count - 1
msgbox args(i)
next
HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS
上一篇:Reverting to the Initial Mesh
下一篇:Reprioritizing Boundaries