- HFSS15在線幫助
- 首頁
- HFSS教學
- HFSS 15 在線幫助文檔
Running HFSS from a command line
HFSS includes line arguments that can be included when launching from a command line or terminal prompt. All command-line arguments are case-insensitive.
Command-line syntax
hfss <options> <run command> <project name/script name>
Run Commands
The following command line run commands are available in HFSS. Of the commands (BatchSave, BatchSolve, BatchExtract, RunScript, RunScriptandExit), one or none must be used as arguments after hfss. Links to the validscheduler environment, you can specify the number of distributed engines that should be used for distributed processing. In this case, you do not specify the machine names after the flag because the names are provided by the scheduler. For example, in the Windows HPC environment, you can write the number of distributed engines as follows.
-machinelist num=4
The COM engines will be distributed across the hosts allocated to the job by the scheduler.
-batchoptions “'<option1>' '<option2>'...”
All options that are specified through Tools>Options dialogs go to the user-level registry. You can override such registry entries via the -batchoptions command line. These overrides apply only to the current Desktop session. This feature is available for all desktop products. The registry setting overrides may be specified on the command line, or may be in a file with the file pathname specified on the command line. The -batchoptions command line option is only valid for batch jobs; it is ignored if neither -BatchSolve nor -BatchSave command line options are specified.
Examples and Further Explanations of -batchoptions use
BatchExtract <batchExtractScriptFile> <projectFile>
This command allows the following Maxwell commands to be executed non-graphicaly via script and without checking out any GUI licenses: ExportProfile, ExportConvergence, ExportMeshStats, ExportNetworkData, ExportNMFData, ExportEigenmodes, ExportTransientData, Update Reports, ExportToFile. A project file must be specified when the command line option BatchExtract is used. This means that commands in the <batch extract script file> will only be executed in the specified poject. The “open/close” project commands are not supported in BatchExtract mode.
Note |
-ng must be used with BatchExtract or it will fail with an error. Including unsupported commands in the batchExtractScriptFile will terminate the script execution. |
Examples:
-ng -BatchExtract <batchExtractScriptFile> <projectFile>
-ng -BatchSolve ..... -BatchExtract <batchExtractScriptFile> <projectFile>
The commands in batchExtractScriptFile will be executed after BatchSolve is done and before the project is saved.
Note that BatchSolve will continue to require solve licenses.
Example Script For Report Export:
hfss -ng -batchextract exportToFile.py "C:\Program Files\AnsysEM\HFSS15.0\Win64\Examples\HFSS\opti_new.hfss"
where exportToFile.py contains:
oDesktop.RestoreWindow()
oProject = oDesktop.SetActiveProject("opti_new")
oDesign = oProject.SetActiveDesign("HFSSDesign1")
oModule = oDesign.GetModule("ReportSetup")
oModule.UpdateReports(["XY Plot 1"])
oModule.ExportToFile("XY Plot 1", "exportToFilePy.csv")
-Monitor
You can monitor progress and messages on standard output, during non-graphical analysis. Progress, warning and info messages are logged to the standard output stream. Error and fatal messages are logged to the standard error stream. Schedulers intercept these streams and provide commands for display of this output - see individual scheduler documentation for specifics.
Examples:
C:\HFSS\hfss.exe -distributed
-machinelist list="192.168.1.1,192.168.1.2"
-batchsolve design_transient:Optimetrics "C:\distrib_project.adsn"
C:\HFSS\hfss.exe -batchsolve HFSSDesign1:Nominal "C:\Project1.hfss"
"c:/Program Files/AnsysEM/HFSS14.0/hfss.exe"
-Iconic -Queue _
-LogFile "H:\HFSS\_HFSSQueue\fence-v2__Array with Fence4.log"
-BatchSolve "Array with Fence4:Nominal" "H:\HFSS\fence-v2.hfss"
-RunScript <script file name>
Run the specified script. You can use the Distributed Analysis for more information on distributed analysis.
Example:
C:\HFSS\hfss.exe -distribute -batchsolve
HFSSDesign1:Optimetrics:ParametricSetup1 "C:\Project1.hfss"
-Help
Open a window that displays the different command-line options. This is only used when Network installations on Windows for Non-graphical batch solves without product-links
Running a Script.
Windows® HPC Task Properties
Command Line Enhancements for Ansoft Desktop Products
Large Scale DSO for Parametric Analysis
Settable Desktop Settings for -batchoptions Use
For -batchoptions Use: Project Directory and Lib Paths
For -batchoptions Use: TempDirectory
For -batchoptions Use: Various Desktop Settings
For -batchoptions Use: HFSS and HFSS-IE Options with Paths
Batch Options Command Line Examples
The Tools>Options>Export Options Files command writes xml files containing the Options settings at all levels to the specified directory (default, ~\Documents\Ansoft\). The Tools>Options>Export Options feature is intended to make it easier for different users to use Ansoft tools installed on shared directories or network drives. The Example Uses for Export Options Features section outlines some use cases enabled by this feature.
-
國內(nèi)最全面的HFSS培訓課程,包含7套視頻教程和2本教材,資深專家講解,視頻操作演示,結(jié)合最新工程案例,讓HFSS學習不再難...【詳細介紹】