Method: GetChannels for Data
- Updated2024-09-12
- 2 minute(s) read
Internal Data > Methods > Method: GetChannels for Data
Method: GetChannels for Data
Returns a collection of channels in the script interface for internal data. DIAdem sorts the result list in ascending channel number order. Use the GetChannels method to create data objects from channel references, for example, from layout configurations, and then to continue processing the data using the script interface for internal data.
Set oElementList = Object.GetChannels(Reference)
| Object | Data Object with this method | ||||
| Reference | Variant Specifies which channels are in the list that the method returns. You use the group or channel index to specify channels, or use conditions to include only specific channels of a channel group in the list. If DIAdem cannot interpret the specified channel list completely, the list returned by the GetChannels method is empty.
| ||||
| oElementList | ElementList <Data> Returned object |
![]() | Note Execute the ChnRenumber command before using the GetChannels method, in order to align the channel sequence in the list with the channel sequence in the structure view. The GetChannels method always returns the list of channels in the global channel number sequence of DIAdem. |
The following example displays all channels that start with T from the Examples channel group.
| VBScript | Python |
Dim oMyChannels, oMyChn, sOutput Call Data.Root.Clear() Call DataFileLoad("Weather.tdm") Set oMyChannels = Data.GetChannels("Weather/T*") For Each oMyChn in oMyChannels sOutput = sOutput & vbCrLf & oMyChn.Name Next MsgBox "Channel names: " & sOutput
Related Functions
See Also
Examples
Concatenate Channels | Sorting Channel Groups | Sorting the Channels in the Default-Group
