Method: Item for DirectAccessChannels
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Methods > Method: Item for DirectAccessChannels
Method: Item for DirectAccessChannels
Returns the DirectAccessChannel object associated with a specific name or with a specific index.
Set oDirectAccessChannel = Object.Item(DAChnNameOrIndex)
| Object | DirectAccessChannels Object with this method |
| DAChnNameOrIndex | Variant Specifies the name or the index of the required channel. |
| oDirectAccessChannel | DirectAccessChannel Returned object |
The following example adds the existing DirectAccess channels to the MyChnGroup channel group:
Dim ChannelGroup : Set ChannelGroup = Root.ChannelGroups.Add("MyChnGroup") Dim i For i = 1 to oBlock.Channels.Count Call ChannelGroup.Channels.AddDirectAccessChannel(oBlock.Channels.Item(i)) Next