DIAdem Help

Method: Item for ElementList <Data>

  • Updated2024-09-12
  • 1 minute(s) read

Method: Item for ElementList <Data>

Returns the ElementList object of a specific index in the script interface for internal data.

Set oElement = Object.Item(Index)
ObjectElementList <Data>
Object with this method
IndexLongInteger
Specifies the index of the element
oElementElement <Data>
Returned object
Note  You can always omit the Item method because it is the standard element of the collection.

The following example searches for all channels that start with the letter T and adds them to the ElementList collection. Then, the example displays the name of the first channel found in the collection. The fourth line of the example is the simplified form of the third line:

VBScriptPython

 

Dim oMyChns
Set oMyChns = Data.GetChannels("T*")
Call MsgBoxDisp("Name of first channel: " & oMyChns.Item(1).Name)
Call MsgBoxDisp("Name of first channel: " & oMyChns(1).Name)

Log in to get a better experience