Item Property (PIConstant collection)

             

 

In a PIConstant collection the Item property is used to retrieve the enumerated constant associated with the passed  descriptive string.  The property returns a reference to a NamedValue object where the Value property contains the enumeration constant.

 

Syntax

object.Item Index

The Item property syntax has these parts:

Part

Description

object

An object expression that evaluates to a PIConstant collection.

Index

A string containing the description of the constant as obtained originally from the PIConstant collection.  

 

 Remarks

The Item property is the default property of the collection. Typical usage is to display a list of available options from a PI-SDK enumeration by iterating through the collection and displaying the name property of each item. When a user selects the particular item of interest from the list the program feeds the selected string to this Item method to retrieve the desired constant used in a following method call.  See the PIConstants collection for a list of supported enumerations.

Enabling Operational Intelligence