DIAdem Help

Property: Count for DirectAccessChannels

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

Property: Count for DirectAccessChannels

Returns the number of elements in a DirectAccessChannels collection.

Object.Count
ObjectDirectAccessChannels
Object with this property
Object.CountLongInteger 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