Vars - method of object PmiItem

Returns reference to the variable of graphic item. See Variables of graphic item.
Vars(sName As String) As Object
oItem.Vars(sName).Value = x
sName(String) Name of the item variable (case sensitive text)

The graphic item variables are defined on the Variables page.

The method can also be called in the graphic item events for Web panels.

Note! The graphic item variable is used as aid for creation of user added item properties.

The variable is an Object type. This object has only a single property Value, representing the value of variable itself. Property access for read and write.

If it is written to this property and if this property is linked to the data binding PP, AP, SP, OP or GP, then the value is transferred also into the source of this binding.
Tip! Graphic item variable can also be obtained directly by the Items method by using the extended path input via #vars.
JavaScriptVBScriptSelect and copy to clipboard

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

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

//Setting the font in the Fontvar variable of the Font type.
oItem.Vars("Fontvar").Value = "PmSmallBold";
PROMOTIC 8.3.23 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice