Predefined symbolic constants

Operating system used

The following Boolean constant determines which operating system is used. That can be used for example in a script ... if (_UNIX) ...

Constant Description
_UNIX For Linux systems TRUE, for Windows FALSE.
_WIN32 For Windows systems TRUE, for Linux FALSE.

Directory paths, version and current project

Absolute paths can be queried with the CTRL function getPath(). The following string constants address directories:

Constant Description
PROJ_PATH Path to the project directory as defined in the file config in the directory PVSS_II. Points to the project-specific resources. CAUTION: the drive character is always uppercase.
PVSS_PATH Path to the WinCC OA installation directory as also defined in the config file. CAUTION: the drive character is always uppercase.
WINCCOA_PATH

Identical to PVSS_PATH (see above).

Path to the WinCC OA installation directory as also defined in the config file. CAUTION: the drive character is always uppercase.

PVSS_BIN_PATH The PVSS_BIN_PATH constant contains the path in the WinCC OA binary directory. It is created from the WinCC OA path in the config file and "/bin/" or "/bin/". If WinCC OA programs are to be started by a control script, this should be done with system(PVSS_BIN_PATH + "WCCILxxxxx" respectively "WCCOAxxxxx"). This assures that there will not be any version conflicts if the directory is not in the current path.
DATA_PATH Path to the DATA directory for the current project. The variable DATA_PATH leads to project-specific data.
VERSION The constant VERSION contains the WinCC OA version as a string, for example "3.0".
VERSION_DISP The new control constant VERSION_DISP shows not only the version but also the service pack number.
VERSION_NUMERIC Contains the WinCC OA version in numerical form, for example 309000 for the WinCC OA version 3.9.
PROJ The constant PROJ contains the current WinCC OA project (a manager runs actual with this project) as a string, for example "Testproj_de_en". Is available in CTRL and UI.
__FILE__ During run-time, the constant is replaced with the name of the file (or library) in which the constant is called.
__FUNCTION__ During run-time, the constant is replaced with the name of the function in which the constant is called.
__LINE__ During run-time, the constant is replaced with the value of the current line number.

Standard input/output, standard error output

Use the following expressions for the function fprintf() and other functions with the data type file. Note that the result depends on your system.

Constant Description
stdin Standard input
stdout Standard output
stderr Standard error output

Borderstyles

Constant Value Description
BS_NONE 0 No border
BS_3D 1 3D border
BS_SUNKEN 2 Sunken border
BS_RAISED 4 Raised border
BS_STYLED 8 Styled border using CSS