DIAdem Help

Content Type
Programming Language
Current manual
Table of Contents

Method: IsKindOf for BaseChannel <Data>

Method: IsKindOf for BaseChannel <Data>

Checks the type of an element in the script interface for internal data.

bIsKindOf = Object.IsKindOf(Type)
ObjectBaseChannel <Data>
Object with this method
TypeString
Specifies the type of the element to be checked.
Enumeration with the following selection terms:
eDataRoot Root type object
eDataChannelGroup ChannelGroup type object
eDataChannel Channel type object
eDataChannelWF Waveform channel type object
eDataAssignmentChannel Assignment channel type object
eDataImplicitChannel Implicit channel type object
eDataChannelPair XY-channel type object
eDataCalculationChannel Calculation channel type object
eDataCalculationChannelFormula Calculation channel type object of Formula type
eDataCalculationChannelReference Calculation channel type object of Calculation Manager calculations type.
eDataVideoChannel Video channel type object
eDataComplexChannel Complex channel type object
bIsKindOfBoolean
The value is TRUE if the object is the specified type.

The following example prompts you to select an item from the Data Portal and then to disable the interaction mode. The example displays whether you have selected the data set (root), a channel group, or a channel, in the Data Portal:

VBScriptPython

 

Dim oMyElement
Call MsgBoxDisp ("Please select one element in the Data Portal. Click 'interaction off' after selecting.")
Call InteractionOn()
Set oMyElement = Portal.ActiveView.Selection(1)
If oMyElement.IsKindOf(eDataRoot) Then
  Call MsgBoxDisp ("Selected element: Root")
ElseIf oMyElement.IsKindOf(eDataChannelGroup) Then
  Call MsgBoxDisp ("Selected element: ChannelGroup")
Else
  If oMyElement.IsKindOf(eDataChannelWF) Then
    Call MsgBoxDisp ("Selected element: Waveform channel")
  End If
  If oMyElement.IsKindOf(eDataImplicitChannel) Then
    Call MsgBoxDisp ("Selected element: Implicit channel")
  End If
  If oMyElement.IsKindOf(eDataAssignmentChannel) Then
    Call MsgBoxDisp ("Selected element: Assignment channel")
  End If
  If oMyElement.IsKindOf(eDataChannelPair) Then
    Call MsgBoxDisp ("Selected element: XY channel")
  End If
  If oMyElement.IsKindOf(eDataCalculationChannel) Then
    Call MsgBoxDisp ("Selected element: Calculation channel")
  End If
  If oMyElement.IsKindOf(eDataVideoChannel) Then
    Call MsgBoxDisp ("Selected element: Video channel")
  End If
  If oMyElement.IsKindOf(eDataComplexChannel) Then
    Call MsgBoxDisp ("Selected element: Complex channel")
  End If
  If oMyElement.IsKindOf(eDataChannel) Then
    Call MsgBoxDisp ("Selected element: Channel")
  End If
End If

The following example determines whether an element selected in the Data Portal is a waveform channel and if so, displays the name and the unit of the waveform channel:

VBScriptPython

 

Dim oMyElement
Set oMyElement = Portal.ActiveView.Selection(1)
If oMyElement.IsKindOf(eDataChannelWF) Then
  Call MsgBoxDisp("Property name: " & oMyElement.Properties("wf_xname").Value & VBCrLf & _
  "Property unit: " & oMyElement.Properties("wf_xunit_string").Value)
Else
  Call MsgBoxDisp ("Selected element is no waveform channel")
End If
In This Section
Was this information helpful?