Method: AddChannelGroup for ChannelGroups <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: AddChannelGroup for ChannelGroups <Data>
Method: AddChannelGroup for ChannelGroups <Data>
Copies a ChannelGroup object in the script interface for internal data and adds the object to the existing ChannelGroup objects.
Set oChannelGroup = Object.AddChannelGroup(ChannelGroup, [DestIndex], [UseChnXRelations])
| Object | ChannelGroups <Data> Object with this method |
| ChannelGroup | ChannelGroup <Data> Specifies the channel group to be added. |
| [DestIndex] | LongInteger Specifies the index of the channel group to be added. If you do not specify this parameter, DIAdem adds the channel group at the end. |
| [UseChnXRelations] | Boolean Specifies whether DIAdem uses the xy-channel references. If the value is TRUE, the method also copies the channel references- If the value is FALSE or if you do not specify the value, DIAdem does not use channel references. |
| oChannelGroup | ChannelGroup <Data> Specifies the channel group to be added. |
The following example copies the default channel group and adds this channel group at second place in the existing channel groups . DIAdem retains the xy-channel references:
| VBScript | Python |
Dim oMyChnGrp, oMyGroups Set oMyChnGrp = Data.Root.ActiveChannelGroup Call Data.Root.ChannelGroups.AddChannelGroup(oMyChnGrp,2,TRUE)