Update cookies preferences
Promotic

Vars - method of the PmgObject object

Description:
Returns the variable of the Pmg object. See Variables of the Pmg object.
Syntax:
Object Vars(Variant id)
Parameters:
id(Variant) Specifies the variable. The value is:
- Name (String, case sensitive text, for example "d1") or
- Index (Long, zero-based index)
Note:
The Pmg object variables are defined on the "Variables" tab.
This method is also functional in Web panels.

Tip! Pmg object variable can be obtained also directly by the Items method by using the extended path input by #vars.
See also:
Example:
JavaScriptVBScriptSelect and copy to clipboard

// Setting the numeric value into the property of the types Double, Integer, Boolean, etc.
oObject.Vars("Numvar").Value = 1;

// Setting the color into the Colorvar variable of the Color type.
oObject.Vars("Colorvar").Value = "#ff0000";

// Setting the font into the Fontvar variable of the Font type.
oObject.Vars("Fontvar").Value = "PmSmallBold";

History:
Pm9.00.25: The id parameter allows to specify the variable also by the index.
Pm8.02.00: (Changed to object.) of the Pmg object now does not return the value of the object variable, but returns an object representing such variable. Only the Vars.Value property returns the variable value. This modification allows to write into variables also in the Web panel.
PROMOTIC 9.0.31 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.