DIAdem Help

Property: BlockLength for CellBlock

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

Property: BlockLength for CellBlock

Specifies the number of values that a channel in the CellBlock contains.

If the number is -1, the block extends to the end of the file.

Object.BlockLength
ObjectCellBlock
Object with this property
Object.BlockLengthLongInteger with read and write access

The following example reads in the values of the worksheet columnwise and saves the values in channels from the first channel group: The example reads in only five values per channel.

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

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