Macros
- Last UpdatedFeb 10, 2026
- 2 minute read
Special macros can be used as values for an item. For example, %system% macro can be used for a configured system. Whenever you call GetConfigItem() or GetSystemConfigItem(), these macros will be expanded automatically. GetConfigItem() will use the system chosen during Data Access Layer (DAL) initialization, while GetSystemConfigItem() will use the system passed as a parameter. If the config item is not found in the given system (chosen during DAL initialization or passed as a parameter), then the values of the config item will be retrieved from the default config values/file. The macros will be expanded based on the system name. However, if a macro cannot be expanded, then it will be returned as it is to the caller.
The following is a list of all standard macros, and is not specific to a particular entry in config file:
-
%System% will be replaced by either the system chosen during DAL initialization, or by the user that has passed the parameter in the GetSystemConfigItem() method.
-
%SystemUserIdentity% will be replaced by either the username used to start services on the system chosen during DAL initialization, or by the user that has passed the parameter in the GetSystemConfigItem() method.
-
%VirtualHost(ServiceName)% macros will be replaced by either the virtual hostname for the system chosen during DAL initialization or whichever user has passed the parameter in the GetSystemConfigItem() method. For example, %VirtualHost(RealTime)% would be replaced by the virtual hostname of the RealTime service.
If there is a special macro that cannot be expanded by GetConfigItem() or GetSystemConfigItem(), then you can pass the string array of macros and their values. Each string will be formated as "%macroname%=value". GetConfigItem(), and GetSystemConfigItem() will try to replace the string array macro first before any of the standard macros explained above. This functionality will allow you to override the behaviour of macro expansion with their own values.
Additional macros will be explained in the following sections.