Method: XRelation for AssignmentChannel <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: XRelation for AssignmentChannel <Data>
Method: XRelation for AssignmentChannel <Data>
Specifies the x-channel for an xy-channel. The x-channel must be in the same channel group as the y-channels. You cannot convert waveform channels into xy-channels because waveform channels already contain the x-part.
Set oChannel = Object.XRelation()
Object | AssignmentChannel <Data> Object with this method |
oChannel | Channel <Data> Returned object |
The following example displays the associated x-channel for an xy-channel.
VBScript | Python |
Dim oMyChn Set oMyChn = Data.Root.ChannelGroups(1).Channels(2) Dim oMyXChn If (oMyChn.IsKindOf(eDataChannelPair))Then Set oMyXChn = oMyChn.XRelation Call MsgBox(oMyXChn.Name) End If
The following example specifies the first channel of the first group as x-channel of the second channel of the first group:
VBScript | Python |
Dim oMyChnX, oMyChnY Set oMyChnX = Data.Root.ChannelGroups(1).Channels(1) Set oMyChnY = Data.Root.ChannelGroups(1).Channels(2) Set oMyChnY.XRelation = oMyChnX
The following example deletes the xy-relationship of the second channel in the first group:
VBScript | Python |
Dim oMyChnY Set oMyChnY = Data.Root.ChannelGroups(1).Channels(2) Set oMyChnY.XRelation = Nothing