ReadVars - property of object PmCommMsg

Returns an object of the Collection type whose items are objects of the Var type, that contain information (value, name, index, etc.) about the variable defined on the Data-received page.
ReadVars As Object
Reading the value of the second variable:
val = oMsg.ReadVars.Item(1).Value 'or
val = oMsg.ReadVars.Item("xy").Value
Property access for read only.

As the parameter of the Item property either the index of the variable (zero-based index) or the name of the variable (data type String, case sensitive text) can be entered.

The ReadVars property cannot be changed (for example another set cannot be assigned). But it is possible to change properties of the objects in this collection, i.e. for example that values of the variables can be changed.

Instead of the ReadVars property, it is usually better to use the #rcvvars identifier, see Example.
See also:
Values of the variables on the Data-received page will be copied into the variables of the PmData object.
VBScriptSelect and copy to clipboard

Dim i, oData, oRead
Set oData = pMe.Pm("/Data")
Set oRead = pMe.Pm("/Comm/Msg1").ReadVars
'The second and easier way of getting the object containing the variables of the Data-received page
Set oRead = pMe.Pm("/Comm/Msg1/#rcvvars")

For i = 0 To oRead.Count-1
  oData.Item(i).Value = oRead.Item(i).Value
PROMOTIC 8.3.30 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