This property allows the user to keep his/her own information within the Instrument. Multiple data can be kept in the Tag property under different keys.
Visual Basic |
---|
Public Property Tag( _ ByVal tagName As String _ ) As Variant |
- tagName
Key string set by the user. When setting, tagName should keep the key that will be associated with the current data.
When getting the information from the tag, one of the previously set keys should be passed as tagName in order to get the corresponding information.
Information represented as Variant
Once set, the tag is kept inside the instrument until modification or deletion. The tag can be modified by any user. Always make sure that the previously set tag has a valid information stored (e.g. some functions in your program has not deleted it).
To delete a tag, the user needs to assign Empty to its value:
Instrument.Tag("tagname") = Empty
See the usage of CQGInstrument properties in the InstrumentSubscribed event's example section.