WriteVars - 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-sent page.
WriteVars As Object
Writing the value into the third variable:
oMsg.WriteVars.Item(2).Value = val 'or
oMsg.WriteVars.Item("xy").Value = val
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 WriteVars 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 WriteVars property, it is usually better to use the #sndvars identifier, see Example.
See also:
Values of the variables of the PmData object will be copied into the variables on the Data-sent page.
VBScriptSelect and copy to clipboard

Dim i, oData, oWrite
Set oData = pMe.Pm("/Data")
Set oWrite = pMe.Pm("/Comm/Msg1").WriteVars
'The second and easier way of getting the object containing the variables of the Data-sent page
Set oWrite = pMe.Pm("/Comm/Msg1/#sndvars")

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