DIAdem Help

Method: SetValuesBlock for Channel <Data>

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

Method: SetValuesBlock for Channel <Data>

Inserts a block of values from an array into a channel in the Data Portal.

Object.SetValuesBlock(newValArray, [Index], [BlockOperationMode])
ObjectChannel <Data>
Object with this method
newValArrayVariant
Specifies the array with the values to be inserted.
[Index]LongInteger
Specifies where DIAdem inserts the values. The index starts at the value 1 (default value).
[BlockOperationMode]Specifies whether DIAdem overwrites values or whether DIAdem inserts the values of the array.
Enumeration with the following selection terms:
 0
eValueBlockValueOverwrite 
DIAdem overwrites existing values (default).
 1
eValueBlockValueInsert 
DIAdem inserts the values at the specified position.

The following example reads out the first two values of the first channel of the default group and overwrites the first two values of the second channel in the default group with these values.

VBScriptPython

 

Dim oMyChannel1, oMyChannel2, MyArray
Set oMyChannel1 = Data.Root.ActiveChannelGroup.Channels(1)
MyArray = oMyChannel1.GetValuesBlock(1,2)
Set oMyChannel2 = Data.Root.ActiveChannelGroup.Channels(2)
Call oMyChannel2.SetValuesBlock(MyArray, 1, eValueBlockValueOverwrite)