Examples and Further Explanations of -batchoptions Use

This section provides further examples and explanations of -batchoptions.

The following examples use general Desktop and HFSS-specific settings. This feature is available for all desktop products.

Example with registry settings specified on the command line

ansysedt.exe -batchsolve -batchoptions

"'Desktop/Settings/ProjectOptions/NumberOfProcessors'=4

'HFSS/NumCoresPerDistributedTask'=2   (* This option is not currently available from the Add Batchoption dialog box.)

'Desktop/ProjectDirectory'='C:\\projects\test'" projectname.aedt

This command line overrides registry values of the NumberOfProcessors (Desktop/Settings/ProjectOptions key) and ProjectDirectory (Desktop key) options.

Note:
  • Multiple registry settings may appear in a single -batchoptions value, separated by whitespace.
  • The -batchoptions value must be enclosed in double quotes if it contains any whitespace.

Example with registry settings specified in a file

ansysedt.exe -batchsolve -batchoptions <filename> projectname.aedt

where the referenced file, <filename>, contains:

$begin 'Config'

'Desktop/Settings/ProjectOptions/NumberOfProcessors'=4

'HFSS/NumCoresPerDistributedTask'=2

'Desktop/ProjectDirectory'='C:/projects/test'

$end 'Config'

This command overrides the registry values of the NumberOfProcessors (Desktop/Settings/ProjectOptions key), NumCoresPerDistributedTask (HFSS key), and ProjectDirectory (Desktop key) options. These overrides apply only to the current Electronics Desktop session.

Note:
  • The -batchoptions <filename> value must be enclosed in double quotes if it contains whitespace
  • The $begin 'Config' and $end 'Config' lines are required

For additional options you can override from the command line with -batchoptions, see:

When to Use the -batchoptions Desktop Command Line Option

You can set analysis parameters for batch mode jobs using the graphical user interface (GUI). For example, you can set all options for a batch job using the Add Batch Option dialog box, which is accessed through the Submit Job To dialog box. These parameter settings include the following solver options (several examples, not a complete list):

For graphical analyses that do not use batch mode, you specify the analysis parameters using the GUI (Tools > Options > General Options or HPC and Analysis Options). These settings are written to the registry when you exit the Electronics Desktop program. The settings are read from the registry when the application is started. Therefore, when you start the Electronics Desktop application, all settings retain the values from the previous session of the same user on the same machine. If there was not a previous session of the same user on the same machine, then the values are obtained from other registry configuration files or from a default value.

When running a batch analysis, any setting that is not specified using the -batchoptions command line option is taken from the registry. This value is typically the setting from the last session of the same user on the same machine. However, the -batchoptions command line option allows you to override the parameter with values specified on the command line or in a batchoptions file. The values specified using the -batchoptions command line option only apply to the batch job, and do not affect the parameter values stored in the registry.

If important -batchoptions values are not specified when running a batch job, the paramaters could be affected by an interactive session running on the same host by the same user. Parameter changes can occur if the user sets an option in the GUI and then exits the program, or if another process that accesses the registry exits. To be sure of the desired batch job outcome, avoid changing options in concurrent interactive sessions or include the desired -batchoptions in the command line.