ReadVars - property of object PmCommMsg

The property 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, which means 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.
Dim oRead, oData, i
Set oRead = pMe.Pm("/Comm/Msg1").ReadVars
' Set oRead = pMe.Pm("/Comm/Msg1/#rcvvars") ' The second and easier way of getting the object containing the variables of the Data-received page
Set oData = pMe.Pm("/Data")
For i=0 To oRead.Count-1
  oData.Item(i).Value = oRead.Item(i).Value
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice