DIAdem Help

Method: Exists for Channels <DataPlugin>

  • Updated2024-09-12
  • 1 minute(s) read

Method: Exists for Channels <DataPlugin>

Checks whether a Channel object with a specific name exists.

iExists = Object.Exists(sName)
ObjectChannels <DataPlugin>
Object with this method
sNameString
Specifies the name of the channel to be checked.
iExistsLongInteger
The value is TRUE if the collection contains an object with the specified name.

The following example generates the SecondChannel in the first channel group only if the FirstChannel channel already exists:

Dim oGrp : Set oGrp = Root.ChannelGroups(1)
If oGrp.Channels.Exists("FirstChannel") Then
  Call oGrp.Channels.Add("SecondChannel", 2)
End If

Log in to get a better experience