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

AVEVA™ Plant SCADA

IPens​.ItemByName [Property][Get]

  • Last UpdatedJul 18, 2023
  • 1 minute read

Gets the Pen of the given name from this Pens collection.

Defined As

  • [VBA] ItemByName(name As String) as Object

  • [Cicode] OBJECT ItemByName(STRING name)

  • [C++] ItemByName(STRING name, IPen* Item)

Parameters

name

[in] Indicates the name of the Pen item to return from this collection.

Execution Result

If the property get succeeds, the return value will be Success. If the pen does not exist, the return value will be InvalidArgument. If the pens 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.ItemByName("CPU Usage")
End Sub

[Cicode]

FUNCTION Example(OBJECT hPens)
// Getting property value
OBJECT hPen = _ObjectCallMethod(hPens, "get_ItemByName", "CPU Usage");
END

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