VTScada Constants and Public Variables

The following constants and public variables may be used in your code where convenient. To use, precede with a backslash (\pi).

Public Variables (Read-Only)

\AppTitle The title of the application.
\AreaList

A dictionary of all tag areas in use. Note the following:
- Area names are stored as the keys of the dictionary, not the values.
- The list is not limited by realm filtering; the dictionary includes all areas in the application.
- Areas no longer in use are not removed from the list until the application restarts.

\RunOnly True if this is a run-time only application.
\ActiveTheme The name of the active color theme. (For example, "Electric Blue")
\OEMGUID GUID for this application's OEM layer.
\AppStartupComplete TRUE when the application has completely loaded and is running normally.
\DataPath Full path to the application's Data folder.
\TraceFilesPath Full path to the folder holding the application's trace files.
\WorkingCopyPath

Full path to the application's source or configuration files under version control, which should not be directly modified without using the correct configuration management APIs. This is usually the ".sync" folder within an application's folder structure.

The folder holding the application can be obtained by removing the "\.sync" portion of the string returned by this variable.

Constants

Geometry

Constant PI = 3.14159265358979;

Text

Constant CR = MakeBuff(1, 13); Carriage return
Constant LF = MakeBuff(1, 10); Line feed
Constant CRLF = Concat(CR, LF); CR/LF pair
Constant ESC = MakeBuff(1, 27); Escape key

Time

Constant SecInMin = 60; Number of seconds in a minute
Constant MinInHr = 60; Number of minutes in an hour
Constant SecInHr = 3600; Number of seconds in an hour
Constant MinInDay = 1440; Number of minutes in a day
Constant SecInDay = 86400; Number of seconds in a day
Constant SecInWeek = 86400*7; Number of seconds in a week

This is a partial list; the full list is not documented.