Method: XRelation for CalculationChannel <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: XRelation for CalculationChannel <Data>
Method: XRelation for CalculationChannel <Data>
Specifies the x-channel for an xy-channel in the script interface for internal data. The x-channel must be in the same channel group as the y-channel.
Set oChannel = Object.XRelation()
Object | CalculationChannel <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, oMyXChn Set oMyChn = Data.Root.ChannelGroups(1).Channels(2) If (oMyChn.IsKindOf(eDataCalculationChannel)) 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