Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

IObjectViewItem​.Tag [Property][Get/Set]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets or Sets a user specified piece of data to associate with this Item.

Defined As

  • [VBA] <Any Type> Tag

  • [Cicode] <Any Type> Tag

  • [C++] VARIANT Tag

Remarks

The user can associate any variant of data with a pen. This is handy for associating some custom data with a pen item, and then having direct access to it whenever any events with a pen item target occur.

Calling Syntax

This example assumes there is a valid Item as retrieved from an Items Collection from an ObjectView. (for example, VBA: objectView.Items.Item(1)).

[VBA]

Sub Example(objectViewItem As Object)
Dim tag As Variant
`Getting Property value
tag = objectViewItem.Tag
`Setting Property value to red
objectViewItem.Tag = tag
End Sub

[Cicode]

FUNCTION Example(OBJECT hObjectViewItem)
// Getting property value
INT nTag = _ObjectGetProperty(hObjectViewItem, "Tag");
// Setting Property to red
_ObjectSetProperty(hObjectView, "Tag", nTag);
END

In This Topic
TitleResults for “How to create a CRG?”Also Available in