Method: Add for ElementList <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: Add for ElementList <Data>
Method: Add for ElementList <Data>
Creates a new element in the script interface for internal data and adds this element to the ElementList collection. The Add method returns an Element object. This method is not available if the ElementList collection is read-only.
Set oElement = Object.Add(DataElement)
Object | ElementList <Data> Object with this method |
DataElement | Element <Data> Contains an element. An element can be a data set (Root), a channel group (ChannelGroup), or a channel (Channel). |
oElement | Element <Data> Returned object |
The following example creates a collection of all channels that start with the letter T and then adds the Speed channel to the collection:
VBScript | Python |
Dim oMyChns Set oMyChns = Data.GetChannels("T*") Call oMyChns.Add(Data.Root.ChannelGroups(1).Channels("Speed"))