Method: SetValuesBlock for Channel <Data>
- Updated2024-09-12
- 1 minute(s) read
Internal Data > Methods > Method: SetValuesBlock for Channel <Data>
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])
| Object | Channel <Data> Object with this method | ||||||
| newValArray | Variant 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:
|
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.
| VBScript | Python |
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)