Method: Exists for Channels <DataPlugin>
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Exists for Channels <DataPlugin>
Method: Exists for Channels <DataPlugin>
Checks whether a Channel object with a specific name exists.
iExists = Object.Exists(sName)
Object | Channels <DataPlugin> Object with this method |
sName | String Specifies the name of the channel to be checked. |
iExists | LongInteger 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