Command Line Options
Navigation: User Guide ➔ Command Line Options
Related Links: Command Scripts
Introduction
Command Line Options are additional flags and options which are added after the primary call of the command line which modify its execution. Command line options can be used:
- in a desktop shortcut for SysCAD (appended to the Target field)
- to run SysCAD from the command line (e.g. CMD, Command Prompt, DOS, Run, PowerShell, Terminal)
- to run SysCAD from a batch (.bat) or command (.cmd) file
The SysCAD executable file is found in the bin folder. E.g. to start SysCAD from command line prompt or shortcut without any command line options (default install directory):
- C:\SysCAD139\bin\SysCAD93.exe (note that ".exe" is usually optional)
If the command prompt is used often, the folder location of the SysCAD executable file can be added to the System PATH environment to avoid having to give the full path every time SysCAD is called.
Command Line Interface Syntax
Two syntax formatting styles are supported for command line interface (CLI):
- Microsoft style with use of '/' for options.
- Unix style with use of '-' or '--' for options. Available from Build 139.37043.
Command Line Options (Original)
This section describes the legacy Microsoft Windows style SysCAD Command Line Interface syntax. From Build 139.37043 it is recommended that the newer Unix style Command Line Options are used.
To call SysCAD with command line options:
- C:\SysCAD139\bin\SysCAD93 [/n] [/rt] [/demo] [/l] [/p] [/nocloseprompt] [ProjectFolder] [*.ssc]
Notes:
- All command line options are optional and may be in any sequence.
- The options are all case sensitive and must be in lower case.
- Any argument that is a string, such as a file/folder, may need to be enclosed in quotes. This is required if it contains spaces or special characters.
| Options | Short Description | Description and Notes |
|---|---|---|
| /n | New instance of SysCAD |
Starts a new instance of SysCAD.
|
| /rt | Runtime mode | Starts a new instance of SysCAD in runtime mode, equivalent to using a Runtime License. This includes the "/n" option. |
| /demo | Demonstration mode | Starts a new instance of SysCAD in (unlicensed) Demo Mode. This includes the "/n" option. |
| /l | License location | Sets the SysCAD License Location for this instance of SysCAD, temporarily overriding the setting in License > License Location (saved in BaseFilesUser\SysCAD.Machine.ini). Option must be followed by a colon and the license folder path, e.g.:
Useful for managing multiple license locations for a single SysCAD install. See Managing Multiple License Locations.
|
| /p | Prompt load of previous project |
On start-up, a dialog prompt automatically appears with the option to load the most recent previous project.
|
| /nocloseprompt | Supress save prompt on close | Supresses the prompt for project save when closing SysCAD. Useful for automation scripts. Use with caution! |
| [ProjectFolder] | Load project |
Loads the project from the specified Project Folder path (usually ending ".spf"). It is not necessary to include the Project File (/Project.spj) as this is assumed.
|
| [*.ssc] | Run command script |
Executes the specified Command Script(s) (*.SSC) in the order they are entered on the command line. A project must be loaded (either via the script, or as a separate command line option).
|
Passing Options to an Open Copy of SysCAD
If there are no command line options, then a new regular instance of SysCAD is started.
If there are any command line options, then at start-up SysCAD will look for the first instance of SysCAD (with the same major Build number) which is already running and pass the command line options to that copy instead. This is primarily used for sending Command Script options to an open copy of SysCAD. All other command line options passed in this way are invalid or ignored. This is the default action unless the /n command line option is also included to start a new instance of SysCAD.
Examples
| C:\SysCAD139\bin\SysCAD93 /n /l:"C:\Program Files\SysCAD License" | Opens a new instance of SysCAD using the specified license |
| C:\SysCAD139\bin\SysCAD93 "C:\SysCAD139\Examples\40 Nickel\Demo Nickel Copper Project.spf" | Opens SysCAD and loads the specified project (this will fail is SysCAD is already open) |
| C:\SysCAD139\bin\SysCAD93 "C:\SysCAD139\Examples\02 Features\Command Script Example.spf\project.spj" "C:\SysCAD139\Examples\02 Features\Command Script Example.spf\CommandScript\UsingExcelReport.ssc" | Opens SysCAD, loads the specified project and runs the specified command script (this will fail is SysCAD is already open) |
Note: A VBA (Visual Basic for Applications) Macro can also be set up in MS Excel to start SysCAD, load projects and run command script files. See Starting and Running SysCAD from MS Excel.
Command Line Options
This section describes the options, or syntax, for SysCAD Command Line Interface. This format is Available from Build 139.37043..
SysCAD Command Line options are based on typical Unix/Linux style Command Line Interface (CLI) conventions:
- Short option flag: single hyphen (-) followed by a single letter. Example SysCAD93 -h
- Short option with arguments: single hyphen (-) followed by a single letter then the argument separated by a space. Example SysCAD93 -s test.ssc
- Long option flag: two hyphens (--) followed by an option name. Example SysCAD93 --demo
- Long option with arguments: two hyphens (--) followed by an option name then the argument separated by a space. Example SysCAd93 --script test.ssc
Notes:
- All command line options are optional and may be in any sequence.
- The options are all case sensitive and must be in lower case.
- Any argument that is a string may need to be enclosed in quotes. This is required if it contains spaces or special characters.
| Option | Argument | Short Description | Description and Notes |
|---|---|---|---|
| -p --project |
Project Filename | Load project | Load the SysCAD project for the specified project folder. Paths containing spaces or long filenames must be enclosed in quotes. |
| -s --script |
Script Filename | Run command script | Executes the specified Command Script(s) (*.SSC) in the order they are entered on the command line. A project must be loaded (either via the script, or as a separate command line option). |
| --title | Title text | Set application title | Prepends the specified title to the application. Useful to distinguish multiple instances of SysCAD. Can be used to identify a specific instance when passing commandline scripts to an open copy. The title text specified is reported by tag PlantModel.System.ApplicationTitle on Plant Model - System tab page.
|
| --send | none | Send commands | Searches for an existing open copy of SysCAD and sends applicable command line options to the copy found. If a title is specified then the open copy must have a matching title. If a copy is found the current instance is closed after sending the commands. If a copy is not found then the commands are processed by the current instance.
|
| --sendrequired | none | Send commands and exit | Searches for an existing open copy of SysCAD and sends applicable command line options to the copy found. If a title is specified then the open copy must have a matching title. If a copy is found the current instance is closed after sending the commands. Unlike the send command, if a copy is not found then the commands are ignored and the current instance is closed.
|
| --solverthreads | N (Thread Count) | Override flowsheet solver threads count | Available from Build 139.37057. Override number of flowsheet solver threads for the application session. Temporarily overrides project settings for flowsheet solver threads. When N = 1 the "Single Threaded" option is used for $Solver.SolverThreadsRequired, and when N > 1 then "User Specified" option is used. The project $Solver.SolveThreads.Maximum is still applied. This applies to all projects that are loaded, and user project settings are not replaced with project save. A typical use would be for N=1 for simultaneously running multiple SysCAD instances at once using SysCAD Command Scripts. |
| -l --license |
License location | Folder name | Sets the SysCAD License Location for this instance of SysCAD, temporarily overriding the setting in License > License Location (saved in BaseFilesUser\SysCAD.Machine.ini). Useful for managing multiple license locations for a single SysCAD install. See Managing Multiple License Locations.
|
| --runtime | none | Runtime mode | Starts SysCAD in runtime mode, equivalent to using a Runtime License. |
| --demo | none | Demonstration mode | Starts SysCAD in (unlicensed) Demo Mode. |
Passing Options to an Open Copy of SysCAD
The option flag -send or --sendrequired must be used to pass command line options to an open copy of SysCAD. With the use of the --title option a specific instance can be targeted by name.
Examples
| C:\SysCAD139\bin\SysCAD93 /l:"C:\Program Files\SysCAD License" | Opens a new instance of SysCAD using the specified license folder. |
| C:\SysCAD139\bin\SysCAD93 -p "C:\SysCAD139\Examples\40 Nickel\Demo Nickel Copper Project.spf" | Opens SysCAD and loads the specified project. |
| C:\SysCAD139\bin\SysCAD93 -p "C:\SysCAD139\Examples\02 Features\Command Script Example.spf\project.spj" -s "C:\SysCAD139\Examples\02 Features\Command Script Example.spf\CommandScript\UsingExcelReport.ssc" | Opens SysCAD, loads the specified project and runs the specified command script. |
Registry Command Line Options
These commands can be used to register or unregister SysCAD Application COM Object and OPC Server. These commands are not case sensitive. Other copies of SysCAD should not be open when running these commands. User must be have administrative rights to run these commands. Please see Setting up SysCAD COM for instructions on how to run commands as an administrator. With these commands, an instance of SysCAD is not fully started and left open. If successful the registry is updated and no feedback is provided.
| OPTIONS | DESCRIPTION | EXAMPLE / NOTE |
|---|---|---|
| /RegCOMServer | Registers the SysCAD COM Application object | C:\SysCAD139\bin\SysCAD93 /RegCOMServer |
| /RegOPCServer | Registers SysCAD as OPC server | C:\SysCAD139\bin\SysCAD93 /RegOPCServer |
| /RegServer | Registers SysCAD COM and OPC | C:\SysCAD139\bin\SysCAD93 /RegServer |
| /UnregCOMServer | Unregisters the SysCAD COM Application object | C:\SysCAD139\bin\SysCAD93 /UnRegCOMServer |
| /UnregOPCServer | Unregisters SysCAD as OPC server | C:\SysCAD139\bin\SysCAD93 /UnRegOPCServer |
| /UnregServer | Unregisters SysCAD COM and OPC | C:\SysCAD139\bin\SysCAD93 /UnRegServer |