CNVSetArrayDataValue
int CNVSetArrayDataValue (CNVData data, CNVDataType type, const void *array, size_t numberOfDimensions, size_t dimensions[]);
Purpose
Sets the specified array in the network variable data. Currently, this function does not support setting string arrays with a number of dimensions greater than two.
Note that different programming environments may interpret multidimensional arrays in different formats. For example, two-dimensional arrays can be interpreted in row-major or column-major formats. This can affect the dimensions and data of multidimensional arrays communicated between different programming environments.
Parameters
Input | ||
Name | Type | Description |
data | CNVData | The handle that identifies the network variable data. |
type | CNVDataType | The type of the specified network variable data. Note that CNVBool refers to a 1-byte boolean type (char or unsigned char), and CNVString refers to a C-style NUL-terminated string. |
array | const void * | An array of the type specified by the type parameter to set in the network variable data. The length of the array you pass for this parameter must be greater than or equal to the value specified by the dimensions parameter. The Network Variable Library treats this parameter as a flat, contiguous block of memory and reads the elements in row-major order. |
numberOfDimensions | size_t | The number of dimensions of the network variable array data. |
dimensions | size_t[] | The array dimensions of the network variable data. The length of the array you pass for this parameter must be greater than or equal to the value specified by the numberOfDimensions parameter. |
Return Value
Name | Type | Description |
status | int | Return value indicating whether the function was successful. One indicates that a next item was found, zero indicates that a next item was not found, and a negative number indicates that an error occurred. You can call CNVGetErrorDescription to obtain a string that describes the error. |
Additional Information
Library: Network Variable Library
Include file: cvinetv.h
LabWindows/CVI compatibility: LabWindows/CVI 8.1 and later