DIAdem Help

Property: Channels for CellBlock

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

Property: Channels for CellBlock

Contains the DirectAccessChannels collection associated with a CellBlock object.

Set oDirectCellChannels = Object.Channels
ObjectCellBlock
Object with this property
oDirectCellChannelsDirectCellChannels
Returned object

The following example reads in the values of the worksheet columnwise from the second row of the first column and saves the values in channels of the first channel group:

Dim oCurrSheet
Set oCurrSheet = Workbook.Sheets(1)
Dim oCellBlock
Set oCellBlock = oCurrSheet.GetCellBlock(2,1)

Dim i, Name, oNewChannel
For i = 1 to oCurrSheet.MaxPosition.Column
  Name = oCurrSheet.GetCellValue(1,i)
  Set oNewChannel = oCellBlock.Channels.Add(Name) 
  Call Root.ChannelGroups(1).Channels.AddDirectAccessChannel(oNewChannel)
Next