• 易迪拓培训,专注于微波、射频、天线设计工程师的培养
首页 > HFSS > HFSS help > Running HFSS from a command line

HFSS15: Running HFSS from a command line

录入:edatop.com     点击:

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 valid options for each run command are listed and/or linked to descriptions.

-BatchSave <project file name>

Saves a named project to the current version. This is primarily intended for converting version 9 projects to version 10 when you intend to subsequently run them on a Linux platform. The conversion from version 9 to version 10 must be done under Windows, HP, or Solaris before those projects can run on a Linux system. You can run this command with the -Iconic option, the -Logfile option, and the -ng option (no graphics).

-BatchSolve

By default, solve all adaptive setups, sweeps, as well as Optimetrics setups found in the project file. If parallel solve is possible, you can use the -Distribute option in conjunction with -BatchSolve. You can run this command with the -Iconic option, the -Logfile option, the - ng option (no graphics), and the -WaitForLicense option.

Additional parameters for batch solves include the following. It is good practice to put quotes around the path to the HFSS executable, and the full path to the project. This ensures that spaces in the path or project will not be an issue. The same is true of the design name, if there are indeed spaces. The quotes must enclose the entire argument including the Nominal or Optimetrics part.

[designName] - batch solve all setups for design with the name given under the project.

[designName]:Nominal - batch solve all nominal setups for design with the name given under the project.

[designName]:Optimetrics - batch solve all Optimetrics setups for design with the name given under the project.

[designName]:Nominal:[setupname] - batch solve the specified nominal setup for design with the name given under the project. The setupname is case insensitive.

[designName]:Optimetrics:[setupname] - batch solve the specified Optimetrics setup for design with the name given under the project. The setupname is case insensitive.

-Local | -Remote | -Distributed

Perform the -Batchsolve on a local machine, a remote machine, or as a distributed solve using a specified machine list (see below). These command line options are mutually exclusive. That is, only one of these options should be specified. The settings persist only for the current session.

If you specify -Local, a machine list is not needed. For -Remote, you should provide a machine list with a single hostname. For -Distributed, you should provide a machine list or file path.

The -Machinelist command line option is used to specify the DSO Machines. This command line option is only meaningful if either -Remote or -Distributed is specified. There are three different formats for the -Machinelist command line option. The different formats are described below.

-MachineList list=“<machine1>, <machine2>, ...

In this format, the DSO machines machine1,machine2,... are listed explicitly on the command line. The machine names must be separated by commas. The machines may be specified by IP address or by hostname, provided that the hostnames are able to be resolved on the Desktop host. If the list contains any whitespace, it must be enclosed in quotes. The number of distributed COM engines run on each host is equal to the number of times that the hostname appears in the list. That is, if host1 appears in the list once, and host2 appears in the list twice, then one COM engine will run on host1 and two COM engines will run on host2.

-MachineList file=<machine list file path>

In this format, the DSO machines are listed in a file. The machine names are listed in the text file, one hostname per line. The pathname of the file is file_path_name. The machines may be specified by IP address or by hostname, provided that the hostnames are able to be resolved on the local host. The number of distributed COM engines run on each host is equal to the number of times that the hostname appears in the list. That is, if host1 appears in the list once, and host2 appears in the list twice, then one COM engine will run on host1 and two COM engines will run on host2.

You can use either form of the MachineList option to indicate the machine(s) on which to run a distributed batchsolve. The settings persist only for the current session.

When you use a file to define the machines available for a distributed solve you should list the machine addresses or names on separate lines:

192.168.1.1

192.168.1.2

(etc)

-MachineList num = <numb distributed engines>

This format is used when a scheduler (such as LSF, PBS, SGE or Windows HPC) is used to manage the jobs sent to a cluster of hosts. In a scheduler 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 FilesAnsysEMHFSS15.0Win64ExamplesHFSSopti_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:HFSShfss.exe -distributed

-machinelist list="192.168.1.1,192.168.1.2"

-batchsolve design_transient:Optimetrics "C:distrib_project.adsn"

 

C:HFSShfss.exe -batchsolve HFSSDesign1:Nominal "C:Project1.hfss"

"c:/Program Files/AnsysEM/HFSS14.0/hfss.exe"

-Iconic -Queue _

-LogFile "H:HFSS_HFSSQueuefence-v2__Array with Fence4.log"

-BatchSolve "Array with Fence4:Nominal" "H:HFSSfence-v2.hfss"

-RunScript <script file name>

Run the specified script. You can use the -ScriptArgs option to add one or more arguments to this command and can use the -Iconic option.

-RunScriptAndExit <script file name>

Run the specified script and exit. You can use the -ScriptArgs option to add one or more arguments to this command. You can also use the -Iconic option, the -Logfile option, and the -WaitForLicense option.

<none>

If you do not specify a run command with hfss on the command line, you can still specify the -Help and -Iconic option.

<project file>

Open the specified project on start up. If -BatchSolve is also set, the project will be solved.

Note

The <project file> must be the last command line entry.

Options

The following options can be associated with one or more of the run commands.

-Distribute

Distribute a batch solve to multiple machines. This option must be combined with the -BatchSolve run command and must be specified before it in the command line. See Distributed Analysis for more information on distributed analysis.

Example:

C:HFSShfss.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 none of the four run commands are used.

-Iconic

Run HFSS with the window iconified (minimized). This can be used with all or none of the run commands.

-LogFile <log file name>

Specify a log file (use in conjunction with -BatchSave or -BatchSolve or -RunScriptAndExit run commands). If no log file is specified, it will be written to the directory in which the script or HFSS project is located, with the name <project_name>.log.

-ng

Run HFSS in non-graphical mode (Use in conjunction with -BatchSave or -BatchSolve run commands. Must be used with -BatchExtract command.).

-WaitForLicense

Wait for unavailable licenses (use along with -BatchSolve or -RunScriptAndExit).

-ScriptArgs <scriptArguments>

Add arguments to the specified script in conjunction with -RunScript and -RunScriptAndExit.

ScriptArgs looks at the single argument after it and uses those as script arguments. You can pass multiple arguments to scriptargs by surrounding the script arguments in double quotes.

For instance:

hfss -scriptargs "HFSSDesign1 Setup1" -RunScriptAndExit c:temptest.vbs

Here, HFSSDesign1 is taken into HFSS as the first argument, and Setup1 is the second argument. Without the quotes, HFSSDesign1 is taken as the first argument, and Setup1 will not be understood by HFSS.

hfss -scriptargs HFSSDesign1 Setup1 -RunScriptAndExit c:temptest.vbs

Example:

c:hfsshfss.exe -runscriptandexit "c:project1.vbs"

-scriptargs "Setup1"

Example:

C:hfsshfss.exe -RunScriptAndExit C:scriptstest.vbs
-scriptsargs "arg1 arg2 arg3"

HFSS 学习培训课程套装,专家讲解,视频教学,帮助您全面系统地学习掌握HFSS

上一篇:Re-solving after Modifying a Design
下一篇:Running More Than One Simulation

HFSS视频培训课程推荐详情>>
HFSS教程推荐

  网站地图