Running Maxwell from a Command Line

Ansys Electronics Desktop includes line arguments that can be included when launching from a command line or terminal prompt. All command-line arguments are case-insensitive. The commands associated batch options can also be used with a Job Management Interface for submitting jobs to Ansys or RSM and other supported schedulers. For more information, see the following:

RSM Integration with Job Management UI

Integration with Microsoft Windows® HPC Scheduler

Integration with Platform's Load Sharing Facility (LSF)

Integration with Grid Engine (GE)

Command-Line Syntax

ansysedt <options> <run command(s)> <project file/script file>

It is good practice to put quotation marks around the path to the solver executable, and around 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 spaces.

Run Commands

The following command line run commands are available for Ansys Electronics Desktop. Of the commands BatchSave, BatchSolve, BatchExtract, RunScript, RunScriptandExit, one or none must be specified as arguments after the solver executable. When none is specified, you may specify a project or archive to open when Electronics Desktop launches, and can only use the -Iconic and -Help options. The commands are further described below:

Job Management from the Command Line

Run Command Examples

A distributed -BatchSolve of a specified design's Optimetrics setups, with a specified machine list:

C:\Program Files\AnsysEM\v242\Win64\ansysedt -distributed -machinelist list="255.255.1.1,255.255.1.2" -batchsolve myDesign:Optimetrics "%UserProfile%\Documents\Ansoft\myProject.aedt"

A -BatchExtract operation using paths to a script file and a project file:

ansysedt -ng -batchextract exportToFile.py "C:\Program Files\AnsysEM\AnsysEM24.2\Win64\Examples\ElectronicsDesktop\Maxwell\Actuators\Solenoid.aedt"

Where exportToFile.py contains:

oDesktop.RestoreWindow()

oProject = oDesktop.SetActiveProject("Solenoid")

oDesign = oProject.SetActiveDesign("MaxwellDesign1")

oModule = oDesign.GetModule("ReportSetup")

oModule.UpdateReports(["XY Plot 1"])

oModule.ExportToFile("XY Plot 1", "exportToFilePy.csv")

-BatchSolve of a specified design's nominal setups, run in a minimized window, with a specified log file:

ansysedt -Iconic -LogFile "H:\Logs\mylog.log" -BatchSolve myDesign:Nominal "H:\Projects\MyProject.aedt"

Specifying Project Files

Specifying a project file opens that project when Electronics Desktop launches. If -BatchSolve is set, the project will also be solved.

You can specify an archive file instead of a project file. If -Batchsolve is set, the project will be automatically restored and solved. Otherwise, you are prompted for a restore location, and the project will be restored and opened.

When a -Batchsolve is being performed on an archive file, you may also specify -archiveoptions:

Options

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

-Batchoptions

All options that are specified through Tools > Options go into the user-level registry. You can override these registry entries via the -batchoptions command line. These overrides apply only to the current Desktop session. 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. Batch jobs can be submitted from the command line or through Electronics Desktop's job submission window.

Large Scale DSO offers two new batchoptions related to the redistribution ability.

Note:

-batchoptions is only valid for batch jobs. It is ignored if you have not specified -BatchSolve, -BatchSave, or -BatchExtract.

-Batchoptions Examples

The batchoption CreateStartingMesh is available for all 3D products (HFSS, HFSS-3DLayout, Q3D, Q2D, Maxwell 3D, and Maxwell 2D). When this option is set, only the initial mesh and manual mesh operation making portion of the setup are completed for the batch solve.

This example enables CreateStartingMesh for HFSS, and runs a batch solve on the specified project:

ansysedt -batchoptions "'HFSS/CreateStartingMesh'=1" -batchsolve "D:\projects\MyProject.aedt"

See: Additional Examples of -Batchoptions Use.

Export Options Files

The Tools > Options > Export Options Files command writes XML files containing the options settings at all levels to the specified directory. This feature is intended to make it easier for different users to use Ansys Electromagnetics Suite 2024 R2 installed on shared directories or network drives. See: Example Uses for Export Options Features.

Related Topics 

Running a Script