Run in Batch Mode

The batch mode option is especially useful for process automation, optimization, and other repetitive simulation tasks.

Run in Batch Mode on Windows

Invoke the script: <installation_directory>\Activate_batch.bat, and then enter either Twin Activate model files (.scm files) or OML scripts (.oml files) as input arguments preceded with –f. For example, for an OML script, enter Activate_batch.bat -f name.oml. For a .scm file, enter Activate_batch.bat -f name.scm
Note: If the model file contains graphical windows, such as plot windows for Scope blocks, the windows are not generated or displayed.

Run in Batch Mode on Linux

Invoke the script: <installation_directory>/scripts/Activate_batch, and then enter either Twin Activate model files (.scm files) or OML scripts (.oml files) as input arguments preceded with –f. For example, for an OML script, enter Activate_batch -f name.oml. For a .scm file, enter Activate_batch -f name.scm
Note: If the model file contains graphical windows, such as plot windows for Scope blocks, the windows are not generated or displayed.

Batch Mode Start Options

Option Argument Required or Optional Description Platform Support
-i <space separated inputs> Optional Passes input(s) to scripts. These options can be accessed in Twin Activate by the OML commands: getcmdinput and getnumofcmdinputs. To pass cell arrays or matrices on Linux, the open/close braces and semi-colons need to be quoted.
Linux example:
-i '{ ' 1,2,3 '}
' [' 4 '; ' 5 '] ' 
stringA
Windows example:
-i {1,2,3} [4;5]
stringA
All supported platforms.
-f <filename>.<extension> Required
  • Runs a model or a script specified by the file.
  • Requires absolute file paths as the argument (separated by ',').
All supported platforms.