Admin Production ni-theme
Current Publication

SetCtrlArrayVal

LabWindows/CVI

SetCtrlArrayVal

int SetCtrlArrayVal (int controlArrayHandle, ...);

Purpose

Sets the value of all the controls in a control array to a value you specify.

This function calls SetCtrlVal on each of the controls in the control array.

If setting the value results in an error for all the controls in the control array, the first error encountered is returned. If setting the value results in an error for at least one control but not all controls, then the function returns the ID of the first control that reported the error. In this case, the value is successfully set on all the controls that did not report an error.

Parameters

Input
Name Type Description
controlArrayHandle int Specifier for a particular control array that is currently in memory. You obtain this handle from GetCtrlArrayFromResourceID or NewCtrlArray.
value ... New value of the control. The data type of value must match the data type of the control.

Return Value

Name Type Description
status int Return value indicating whether the function was successful. A negative number indicates that an error occurred.

If setting the value results in an error for all the controls in the control array, the first error encountered is returned. If setting the value results in an error for at least one control but not all controls, then the function returns the ID of the first control that reported the error. In this case, the value is successfully set on all the controls that did not report an error.

Additional Information

Library: User Interface Library

Include file: userint.h

LabWindows/CVI compatibility: LabWindows/CVI 2010 and later