Command Line Options

It is possible to run CST Studio Suite in batch mode.

Please note that the quotation marks are mandatory!

 

In addition to the command line options listed below also environment variables are available.

 

CST Studio Suite will return an exit code when started in batch mode. Please find an overview of the exit code in the following overview:

0 = EXITCODE_SUCCESS

CST Studio Suite shutdown properly without any error.

1 = EXITCODE_FAILED

A general error occured on startup of CST Studio Suite (e.g. invalid installation directory or working directory).

2 = EXITCODE_ABORTEDBYUSER

The solver was aborted by the user.

3 = EXITCODE_NOLICENSE

The requested license was not available.

4 = EXITCODE_FAILED_TO_OPEN

The project could not be opened.

 

Please note: All options are accessible by using -<option> or - -<option>: e. g. both is valid -help and - -help:

To start a specific module, open a help project or perform some basic settings, the following command line options are available

Options

Description

-m

Starts CST Microwave Studio

-s

Starts CST EM Studio

-t

Starts CST Particle Studio

-mp

Starts CST Mphysics Studio

-c

Starts CST Design Studio

-cs

Starts CST Cable Studio

-pcbs

Starts CST PCB Studio

-? or -help

Shows the help text in command window

-d

Uses filename relative to the installation directory

-i

Starts the application in the iconified state

 

 

 

In general, the following extensions are valid for filename

Extension

Description

.bas

Executes the BASIC file;  -m, -s, -t or -c must be specified

.cst

Loads the CST Studio Suite project file; -m, -s, -t, -mp or -c must be specified

.mod

Loads the CST Microwave Studio project file; -m, -s, -t, -mp or -c must be specified

.ems

Loads the CST EM Studio project file; -m, -s, -t, -mp or -c must be specified

.psf

Loads the CST Particle Studio project file; -m, -s, -t, -mp or -c must be specified

.mpf

Loads the CST Mphysics Studio project file; -m, -s, -t, -mp or -c must be specified

.des

Loads the CST Design Studio project file; -c must be specified

 

 

 

The following options start a calculation after loading a project (and are only valid with a given project file)

Options

Description

-as

Starts the active solver for the saved project. Not valid with -pcbs.

-p

Starts a parameter sweep with the active solver

-o

Starts the optimizer with the active solver

-n

Starts a network parameter extraction; only valid for -m or -c

-f

Starts the frequency domain solver; only valid for -m

-r

Starts the time domain solver; only valid for -m

-e

Starts the eigenmode solver; only valid for -m

-q

Starts the integral equation solver; only valid for -m

-a

Starts the asymptotic solver; only valid for -m

-ml

Starts the multilayer solver; only valid for -m

-se

Starts the electric field solver; only valid for -s

-sh

Starts the magnetic field solver; only valid for -s

-sj

Starts the stationary current field solver; only valid for -s

-lf

Starts the LF frequency domain solver (magnetoquasistatic or fullwave); only valid for -s

-lfeqs

Starts the LF frequency domain solver (electroquasistatic); only valid for -s

-ltmqs

Starts the LF time domain solver (magnetoquasistatic); only valid for -s

-ht

Starts the stationary thermal solver; only valid for -mp

-httd

Starts the transient thermal solver; only valid for -mp

-mech

Starts the structural mechanics solver, only valid for -mp

-cht

Starts the conjugate heat transfer solver, only valid for -mp

-tp

Starts the particle tracking solver; only valid for -t

-te

Starts the electric field solver; only valid for -t

-th

Starts the magnetic field solver; only valid for -t

-tw

Starts the wakefield solver; only valid for -t

-pic

Starts the particle in cell solver; only valid for -t

-u

Updates the results in CST Design Studio, only valid for -c

-dump <n>

Update results every n minutes when a solver is running.

Only valid for -m, -s, -t, -mp, -cs or -as

-b

 

Executes the script file "Model.run" that has to be located in the "Model/3D/" folder of the corresponding project; only valid for -m, -s or -t

-par <filename>

Imports parameters from a file. The parameters can be defined like this:
variablename=value
or
variablename="value" "description"
For example:
var1=20
var2=12.3*sin(45)
var3=var1+var2
var4="var1 + var2" "some \"fancy\" description"

Literal quotes and backslashes need to be escaped with a backslash when using the second form, as shown in the last example. The encoding of the file is UTF-8.

-rebuild

Performs a complete history rebuild; only valid for -m, -s, -t, -mp or -cs

-adjust_picks

Adjusts the picks in the project to a newer ACIS version.

-withdc

-withdc=maincontroller:port

 

Starts the specified solver with distributed computing. If no main controller is specified, the main controller from the global or project dependent settings are taken. Otherwise the specified main controller is used.

Also supported by Job Control Center.

-dcn

This option sets the distributed excitations or frequency samples to n. Only valid for -withdc and -r, -f, and -q.

Example: -dc6

Also supported by Job Control Center.

-dcparn

Sets the number of distributed parameter sets to n. Only valid for -withdc and -p and -o.

When used with -dcn and a transient simulation, then the ports are also distributed.

Example: -dcpar10

Also supported by Job Control Center.

-withmpi

Enables MPI computing. Also a machinefile must be specified, when using MPI; only valid for CST Microwave Studio (-m) and either the  transient solver (-r), the frequency domain solver (-f) or the integral equation solver (-q) as well as for CST Particle Studio (-t) and the wakefield solver (-tw).

See introduction for Queuing System and MPI for the detailed command description and also an overview of Queuing system.

Also supported by Job Control Center.

-machinefile "mach_file"

Defines the location of the Machine file path (mach_file), in order to use MPI simulation jointly with a given queuing system launcher.

Machine file path should be enclosed in "" pair.

Must be used with -withmpi and can be used with -withdc

Also supported by Job Control Center.

-queuesys "qs_tag"

Defines the queueing system. Currently available queuing system tags (qs_tag) are {CST, MPI, SGE, OGE, PBS, LSF, LSF_MCPU}.

Also supported by Job Control Center.

-withgpu=<#n>

Defines the number of hardware acceleration devices to be used for the given simulation. Currently available for CST Microwave Studio (-m) with the  transient solver (-r) only. The number of selected hardware devices can be either 1 ... 8.

Also supported by Job Control Center.

-numthreads=<#n>

 

Defines the number of threads to be used for the given simulation. These threads will be distributed over the CPU devices defined (see -numcpudevices option below).

Also supported by Job Control Center.

-numcpudevices=<#n[:id0[,id1, ...]]>

 

Defines the number of CPU devices to be used for the simulation. The specified number can be 1 ... 8. If needed, specific CPU device IDs can be specified after the number #n by adding a colon and then a comma separated list of CPU device IDs.

Also supported by Job Control Center.

-defaultacc

Overwrites all project specific acceleration settings (related to threads, DC, MPI and hardware acceleration) to their default settings. All command line options related to acceleration are taken still into account, though.

Also supported by Job Control Center.

-protect <string1> <string2>

string1: [Mandatory] CST project or a directory

string2: [Optional] Protected project settings file

 

Saves a protected copy of the specified CST project. If a directory is specified, all CST projects found in the directory and its sub-directories will be saved as protected. The protected project settings file could be used to control which objects are marked protected.

 

-shared-dir

-shared-dir=path1;path2

 

Specifies the directories which can be accessed by remote machines separated by ';'. Only valid for -withdc and -withmpi.

If no path is given the current project dir is used.

 

Example

To open a project and solve it using the transient solver, use:

"<Installation Path>\CST DESIGN ENVIRONMENT.exe" -m -r "C:\My Work\MyProject.cst"

 

If any other setting is necessary, it can be accomplished by executing an appropriate Visual Basic file.  Each module can be controlled through Visual Basic commands.

See also

Environment Variables, VBA Application Object