Running Ansys Electronics Desktop 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.

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:

ansysedt.exe // Start GRPV server listening on a port in the default range 50051:51051.

ansysedt.exe -grpcsrv portnumber // Start GRPV server listening on the the port number. error if the port already used.

ansysedt.exe -grpcsrv 50051:50150 // Start GRPV server listening on a port range 50051:50150.

ansysedt.exe -grpcsrv 50051:100 // Start GRPV server listening on a port range 50051:50151.

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 "C:\myProject.aedt"

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

Note: The example is for an HFSS project. The path, project and design names will vary depending on what the user specifies.

ansysedt -ng -batchextract exportToFile.py "C:\Program Files\AnsysEM\v242\Win64\Examples\ElectronicsDesktop\HFSS\RF Microwave\OptimTee.aedt"

Where exportToFile.py contains:

oDesktop.RestoreWindow()

oProject = oDesktop.SetActiveProject("OptimTee")

oDesign = oProject.SetActiveDesign("HFSSDesign1")

oModule = oDesign.GetModule("ReportSetup")

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

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

A -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.

Note:
  • Options are arranged as keys and values (in a structure similar to the Windows Registry). However, these options are not a part of the Windows Registry but are separately stored and maintained by the Ansys Electronics Desktop software.
  • For access to options and functionality beyond what is directly accessible via the user interface or batch options, refer to the documentation of the UpdateRegistry tool. This tool is discussed in the following help topic and in the topics that follow it in the same branch of the product help:

    Setting or Removing Option Values in Configuration Files: UpdateRegistry Command

You can override the option 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 the following products:

HFSS, HFSS-3DLayout, Icepak, Q3D, Q2D, Maxwell3D, Maxwell2D, and Mechanical.

When this option is set, only the initial mesh and manual mesh operations are completed for the batch solution.

Note:

No adaptive meshing occurs for any Icepak or Mechanical solutions. Therefore, after solving, the final mesh will be identical to the starting mesh for these two design types.

This example enables CreateStartingMesh for HFSS, and runs a batch solution of 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.