Command Line Options
Navigation: User Guide ➔ Menu Commands ➔ Tools ➔ Command Scripts ➔ Command Line Options
Introduction
The command line options can be used:
- in a desktop shortcut for SysCAD (Target field)
- to run SysCAD from the CMD or DOS prompt
- to run SysCAD from within a batch (or cmd) file
Example to start SysCAD from command line prompt or shortcut:
- C:\SysCAD139\bin\SysCAD93
If the DOS or CMD prompt is used often, the folder location of the SysCAD executable file can be added to the system search path to avoid having to give the full path every time SysCAD is called.
The SysCAD executable file is normally found in the folder:
- SysCAD installed drive:\SysCAD139\bin (for SysCAD 9.3 build 139)
- SysCAD installed drive:\SysCAD138\bin (for SysCAD 9.3 build 138)
- SysCAD installed drive:\SysCAD137\bin (for SysCAD 9.3 build 137)
- SysCAD installed drive:\SysCAD93\bin (for SysCAD 9.3 build 136)
Passing options to an already open copy of SysCAD
If there are no command line options, then a new instance of SysCAD is started.
If there are any command line options, then at startup SysCAD will look for the first instance of SysCAD running (that has the same major Build number) and pass the command line options to this and exit the instance started. This is the default action unless the /n command line option is included to start a new instance of SysCAD.
General Command Line Options
NOTE: The examples given below are common for all 9.3 builds. Where SysCADxxx is used below, please substitute in SysCAD138, SysCAD137 or SysCAD93 depending on the version of SysCAD used.
In general, an example of the command line with its different options is as follows:
- SysCADxxx [/l] [/n] [/p] [*[.SPJ]] [*.SSC]
All options are optional as indicated by the square brackets. The options are case sensitive. They may be in any sequence. The different switches are explained as follows:
OPTIONS | DESCRIPTION | EXAMPLE / NOTE |
---|---|---|
/l | Location of SysCAD license. | For example, if SysCAD is installed on the network, the license is located on the server machine, use this to point to the SysCAD License Location.
|
/n | starts a new instance of SysCAD. |
|
/rt | runtime mode |
|
/p | prompt for reload of previous project. |
|
/nocloseprompt | don't prompt for project save when closing | |
/[*.spj] | loads the specified project. |
|
/[*.ssc] | loads the specified script command file. |
|
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 here 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:\SysCAD138\bin\SysCAD93 /RegCOMServer |
/RegOPCServer | Registers SysCAD as OPC server | C:\SysCAD138\bin\SysCAD93 /RegOPCServer |
/RegServer | Registers SysCAD COM and OPC | C:\SysCAD138\bin\SysCAD93 /RegServer |
/UnregCOMServer | UnRegisters the SysCAD COM Application object | C:\SysCAD138\bin\SysCAD93 /UnRegCOMServer |
/UnregOPCServer | UnRegisters SysCAD as OPC server | C:\SysCAD138\bin\SysCAD93 /UnRegOPCServer |
/UnregServer | UnRegisters SysCAD COM and OPC | C:\SysCAD138\bin\SysCAD93 /UnRegServer |
Examples
Cmd or DOS prompt examples
- C:>\SysCAD138\bin\SysCAD93 /n /l:"c:\program files\SysCAD License"
- C:>\SysCAD138\bin\SysCAD93 "C:\SysCAD138\Examples\40 Nickel\Demo Nickel Copper Project.spf"
- C:>\SysCAD138\bin\SysCAD93 "C:\SysCAD138\Examples\02 Features\Command Script Example.spf\project.spj" "C:\SysCAD138\Examples\02 Features\Command Script Example.spf\CommandScript\UsingExcelReport.ssc"
The following commands must be ran under the administrative command mode:
- C:>\SysCAD138\bin\SysCAD93 /RegCOMServer
- C:>\SysCAD138\bin\SysCAD93 /RegOPCServer
- C:>\SysCAD138\bin\SysCAD93 /RegServer
- C:>\SysCAD138\bin\SysCAD93 /UnRegCOMServer
- C:>\SysCAD138\bin\SysCAD93 /UnRegOPCServer
- C:>\SysCAD138\bin\SysCAD93 /UnRegServer
Note: A VBA (Visual Basic Macro) can also be set up in MS Excel to Start and Run SysCAD and the command script files. See Starting and running SysCAD from MS Excel.