GetItemAnnotation Method (IPIValues2 interface)

                    

Given an one-based index key, this method returns a variant containing the annotation of the corresponding PIValue object in the PIValues collection. If the PIValue dose not have an annotation, the result variant will be empty (VT_EMPTY).

Syntax

object.GetItemAnnotation Index

The GetItemAnnotation method syntax has these parts:

Part

Description

object

An object expression that evaluates to a IPIValues2 interface. This interface can be obtained from a PIValues object.

Index

A long integer specifying the position number of a member of the PIValues collection. Must range from 1 to the value of PIValues.Count.

Remarks

Trappable Errors

In addition to generic errors (such as Out of Memory), the following errors may occur:

Error

Description

PISDK_E_PIVALUESEMPTY Empty PIValues collection.
PISDK_E_COLLINDEXOUTOFRANGE Index is out of range.
Enabling Operational Intelligence