Question:
When communicating with VBScript driver, how can I access the elements of a Block Tag via scripts?
Solution:
To access the block elements, you must use an array. For example, for accessing the elements in a 5-element block tag, whose Item column is set up as ItemBlockColumn, use the following script:
Sub OnRead_ItemBlockColumn(r, v)
v.value = Array(1,2,25,4,33)
End Sub
v.value = Array(1,2,25,4,33)
End Sub
In this example, every time the script is executed, value 1 is attributed to block element 1, value 2 is attributed to block element 2, value 25 is attributed to block element 3, value 4 is attributed to block element 4, and value 33 is attributed to block element 5.