Indicates to the compiler an optional command, script or batch file to execute after a successful compile. To execute an optional application, script or batch file to execute after an unsuccessful compile use the parameter [CtEdit]CompileUnsuccessfulCommand
Allowable Values: Any valid command line containing replacement strings that represent possible information that the compiler can provide, including such information as project name, project path, INI path, bin path, etcetera. Enclose the replacement strings in ‘%’ characters, similar to DOS batch file notation.Use the escape character “^” if you want to include the ‘%’ character literally.
Allowable replacement strings
Replacement Strings | Description |
---|---|
CtEnvBinPath | Path to the Bin folder of CitectSCADA |
CtEnvConfigPath | Path to the config folder |
CtEnvDataPath | Path to data folder |
CtEnvIncludeProjects | List of include projects for the project being compiled |
CtEnvErrors | Number of errors encountered during compile |
CtEnvIncludeProjectPaths | List of the directory paths of the include projects for the project being compiled, in the same order as the projects are listed in CtEnvIncludeProjects |
CtEnvIniPath | Path to the ini file |
CtEnvLogPath | Path to log files |
CtEnvProject | Name of the project that is being compiled |
CtEnvProjectPath | Path to the project file that is being compiled |
CtEnvWarnings | The number of warnings that were encountered during compile |
If an undefined replacement strings is specified in the command line a compiler warning will be generated, and the application will not be called. Compiler warnings will also be generated if the compiler does not execute the command line successfully. However, any errors that occur when the command is executing will not be logged, as they will not be known to the compiler.
Example:
This would execute 7z.exe (a file compression application)and package up the xml files in the folder of the project file that is being compiled into the misc.zip file in the same folder.
Create a text file with the following content:
7z.exe a –tzip “%CtEnvProjectPath%\misc.zip” “%CtEnvProjectPath%\*.xml”
The replacement strings can be used directly in the INI parameter value and t can be accessed as application environment variables. The example demonstrates this method.
See Also