DIAdem Help

Method: GetChannelGroups for Data

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

Method: GetChannelGroups for Data

Returns a collection of channel groups in the script interface for internal data.

Set oElementList = Object.GetChannelGroups(Reference)
ObjectData
Object with this method
ReferenceVariant
Specifies which channel groups are in the list the method returns. You can use different comma-separated expressions. Each expression must conform to the following syntax:
"[GroupIndexes]"Specifies the indices of the channel groups. You can separate the indices with commas or specify an index range with two points. If you do not specify an index, the method returns the default group.
"Identifier"Specifies the names of the channel groups. You can also specify a channel reference instead of the group name or use wildcards in the group name. For channel group names, use a question mark (?) as a wildcard for one character, and an asterisk (*) as a wildcard for any number of characters. If the group name contains commas, you must enclose the name in single quotation marks (').
If the conditions do not meet the name conventions for channel group names, DIAdem replaces the invalid characters with valid characters.

oElementListElementList <Data>
Returned object

Note  If the method GetChannelGroups does not find a channel group that matches the specified criteria in the Reference parameter or if the expression is not valid, the method returns an empty list.

The following example returns the second, fourth, fifth to seventh, and the default channel group:

VBScriptPython

 

Dim oMyChannelGroups, oMyChnGrp
Set oMyChannelGroups = Data.GetChannelgroups("[2,4,5..7],[]")
For Each oMyChnGrp in oMyChannelGroups
  Call MsgBoxDisp(oMyChnGrp.Name)
Next

The following example outputs the names of all channel groups whose names start with E:

VBScriptPython

 

Dim oMyChannelGroups, oMyChnGrp
Set oMyChannelGroups = Data.GetChannelgroups("E*")
For Each oMyChnGrp in oMyChannelGroups
  Call MsgBoxDisp(oMyChnGrp.Name)
Next

The following example displays the names of the Example channel group and the second channel group:

VBScriptPython

 

Dim oMyChannelGroups, oMyChnGrp
Set oMyChannelGroups = Data.GetChannelgroups("Example/Time,[2]")
For Each oMyChnGrp in oMyChannelGroups
  Call MsgBoxDisp(oMyChnGrp.Name)
Next

Related Functions

GetChannel | GetChannels

Log in to get a better experience