EvalMacro - method of object Pm

Evaluation of the macro expression.
EvalMacro(sMacro As String, [sParams As String]) As String
x = Pm.EvalMacro(sMacro)
sMacro(String) Macro expression, see PROMOTIC system macro expressions description.
sParams[optional] (String) Additional parameters for macro expression evaluation. Entries are in format KeyVal, for example "lang:cs;".
"lang:ss;" (optional) - Specifies national language for Macro expression $.text. Language is determined with a text identifier, e.g. "en", "de", "ru" etc. - see Fully supported languages in the PROMOTIC system. If not set, then the present language of application is used instead. See the configurator "PmRoot > Application > Main language of runtime".
Return Values:
Returns the value of the evaluated macro expression in text form
The method can not be used for evaluating the $.par macro expression. The following methods can be used instead: method PmObject.GetPar (for PROMOTIC objects) or method PmiItem.GetPar (for Graphic items).
This method is not functional yet for Web panels.
Detects value from configuration file
VBScriptSelect and copy to clipboard

Dim sVal
sVal = Pm.EvalMacro("$.cfgfile('config/data/port1',0)")
Reading of appropriate localized text in english language
VBScriptSelect and copy to clipboard

Dim sTxt
sTxt = Pm.EvalMacro("$.text('sys','userDesc')", "lang:en;")
Another option of obtaining localized texts is to use #pragma variable - this is also functional in Web panels.
PROMOTIC 8.3.24 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
- Pm
- Abs
- Cos
- E
- EvalMacro
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice