Using the Process Analyst > Process Analyst for Developers > Automation Model > IPens.Item [Property][Get]

IPens.Item [Property][Get]

Gets the Pen at the given index from this pen's collection.

Defined As

Parameters

index

[in] Indicates the index of the pen item to return from this collection. (One based)

Execution Result

If the property get succeeds, the return value will be Success. If the index is out of range, the return value will be InvalidArgument. If the pen's collection is deleted, the return value will be GeneralFailure.

Calling Syntax

This example assumes there is a valid Pens collection object to be passed into the example methods.

[VBA]

Sub Example(pens As Object)
Dim pen As Object
`Getting Property value
Set pen = pens.Item(1)
End Sub

[Cicode]

FUNCTION Example(OBJECT hPens)
// Getting property value
OBJECT hPen = _ObjectCallMethod(hPens, "get_Item", 1);
END