DIAdem Help

Method: Item for Elements <DataStore>

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

Method: Item for Elements <DataStore>

Returns the Elements object associated with a specific name or with a specific index, in a data store.

Set oElement = Object.Item(NameOrIndex)
ObjectElements <DataStore>
Object with this method
NameOrIndexVariant
Specifies the name or the index of the data element.
oElementElement <DataStore>
Returned object

Note  You can always omit the Item method because this method is always the standard element of the collection.
The following example displays the name of the first data element below the first root element:

VBScriptPython

 

Dim oMyDataStore, oMyRootElement, oMyStoreElements
Set oMyDataStore = Navigator.ConnectDataStore("ASAM Browse Settings Example")
Set oMyRootElement = oMyDataStore.RootElements(1)
Set oMyStoreElements = oMyRootElement.Children
Call MsgBoxDisp(oMyStoreElements.Item(1).Name)