PROMOTIC system macro expressions description

In many Promotic objects and graphic items property configurators and in the Pm.EvalMacro method (but alsi in other methods) it is possible to use the macro expression.

The macro expression for example allows to enter a text into the configurator, that is "evaluated" when the application is launched. For example this macro expression can be used for:

- refering to the localised text in the XML file (Macro expression $.text)
- refering to the value in an INI file (Macro expression $.cfgfile)
- create a complex evaluation of multiple macros, etc.

The macro expression is always evaluated just once, at application launch, when opening a panel or when calling a method (based on logic of placing) respectively. Therefore it is not possible to assume the macro as a data binding!

For all configurators or methods with possible macro entery, this possibility is allways explicitly stated in the description (see the configurator PmiText > Text). There is also the information about the the macro evaluation sequence - in most cases:

- The macro expression in the Promotic object configurator is evaluated while the application is starting.
- The macro expression in the Promotic object configurator is evaluated while the panel is opening.
- The macro expression in the method parameter is evaluated when the method is called.
List of macro expressions:
$.text: Represents the string read from a text file.
$.par: Reference to PROMOTIC object parameter or graphic item parameter
$.cfgfile: Represents the value stored in the configuration file.
$.join: Represents a string value composed of all parameters of current expression.
$.expr: Evaluates an expression written in JavaScript syntax.
$.path: Represents the full path to the folder or file.
$const: (obsolete) Represents the string quoted directly from current macro expression.
$vb: (obsolete) Represents the result of the specified VBScript expression evaluation.
See also:
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice