Property: Count for DirectAccessChannels
- Updated2024-09-12
- 1 minute(s) read
DataPlugin > Properties > Property: Count for DirectAccessChannels
Property: Count for DirectAccessChannels
Returns the number of elements in a DirectAccessChannels collection.
Object.Count
| Object | DirectAccessChannels Object with this property |
| Object.Count | LongInteger with read access Returns the number of DirectAccess channels. |
The following example creates two channels for a BinaryBlock and inserts these DirectAccess channels into the MyChannelGroup channel group:
Dim oBlock : Set oBlock = File.GetBinaryBlock() Call oBlock.Channels.Add("Channel1",eI32) Call oBlock.Channels.Add("Channel2",eI32) Dim ChannelGroup : Set ChannelGroup = Root.ChannelGroups.Add("MyChannelGroup") Dim i For i = 1 to Block.Channels.Count Call ChannelGroup.Channels.AddDirectAccessChannel(Block.Channels.Item(i)) Next