Applies to:
PcVue version 7.20c onwards. |
||
|
||
Summary:
This article shows how to use VBA and Enable scripting to access extended attributes. |
||
|
||
Details:
VBA script MsgBox Variables(“@BIT”).ExProperties(“TATT3”).Value where @BIT is a Database variable. Enable script MsgBox TheseVariables(“@BIT”).ExProperties(“TATT3”).Value where @BIT is a Database variable. The ExProperties collection ExProperties is a collection of extended attributes attached to the Variable object (Objects collection ExProperty). The collection exposes these items for a variable: The ExProperty object’s properties An Exproperty object has the following properties: In the HMI, these properties appear in the dialogs opened from the menu Configure.Variables.Selector.Variable,Attributes.Behaviour. Examples To find out the value of the property ‘Access’ of the third text attribute (TATT3) of variable @BIT: MsgBox Variables(“@BIT”).ExProperties.Item(“TATT3”).Access By default, this will return 2 (dynamic). To read the value of the property ‘Value’ of the first binary attribute (BATT1) of the variable @BIT: MsgBox Variables(“@BIT”).ExProperties.Item(“BATT1”).Value This will return True if Value is 1 or False if it is 0. |
||
|
||
|
Created on: 05 Nov 2010 Last update: 13 May 2024