Method: Move for Data
- Updated2024-09-12
- 2 minute(s) read
Internal Data > Methods > Method: Move for Data
Method: Move for Data
Moves in the script interface for internal data a channel group or a channel to a different position in the Data Portal.
Object.Move(Source, Destination, [DestIndex], [UseChnXRelations])
Object | Data Object with this method |
Source | Element <Data> Specifies the channel group or channel to be moved. |
Destination | Variant ElementList <Data> or Element <Data> If you assign an ElementList <Data> type object to the Destination parameter, the parameter determines the collection of channel groups or channels to which you move a channel group or a channel. If you assign an Element <Data> type object to the Destination parameter, the parameter determines the object behind which DIAdem moves the object you want to move. In this case, DIAdem ignores the DestIndex parameter. |
[DestIndex] | LongInteger Specifies the index of the position to where you move a channel group or a channel. If you do not assign a value to the DestIndex parameter, DIAdem moves the channel group or the channel to the end of the collection. |
[UseChnXRelations] | Variant Specifies whether DIAdem uses the xy-channel references. If the value is TRUE, the method also copies the corresponding x-channel and retains the channel references. If the value is FALSE or if you do not specify the value, DIAdem does not use channel references. |
The following example moves the first channel of the first channel group to the second position in the second channel group:
VBScript | Python |
Dim oMyChannel, oMyChannels Set oMyChannel = Data.Root.ChannelGroups(1).Channels(1) Set oMyChannels = Data.Root.ChannelGroups(2).Channels Call Data.Move(oMyChannel, oMyChannels, 2)
The following example moves the first channel of the first channel group behind the first channel of the second channel group:
VBScript | Python |
Dim oMyChannel1, oMyChannel2 Set oMyChannel1 = Data.Root.ChannelGroups(1).Channels(1) Set oMyChannel2 = Data.Root.ChannelGroups(2).Channels(1) Call Data.Move(oMyChannel1, oMyChannel2)