IMAQdxSetAttribute

NI-IMAQdx Function Reference

IMAQdxSetAttribute

Format

rval = IMAQdxSetAttribute (IMAQdxSession id, const char *name, IMAQdxValueType type, ...);

Purpose

Sets the value for a camera attribute.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
name const charĀ * The name of the attribute you want to set. Refer to Attribute Name for a list of attributes.
type IMAQdxValueType The type of the attribute value you want to set.
... variable argument Data is passed by value. The data type should match type.

Parameter Discussion

name specifies the attribute whose value you want to obtain. In LabWindows/CVI function panel, when you click the control or press <Enter>, <Spacebar>, or <Ctrl-down arrow>, a dialog box opens containing a hierarchical list of the available attributes. Attributes whose values cannot be obtained are dimmed. You can access function help text for each attribute by double-clicking an attribute or by selecting the attribute and pressing <Enter>.

type specifies the type of the value parameter. The following types are supported: IMAQdxValueTypeU32, IMAQdxValueTypeI64, IMAQdxValueTypeF64, IMAQdxValueTypeString, IMAQdxValueTypeEnumItem, and IMAQdxValueTypeBool.

Return Value

On success, this function returns IMAQdxErrorSuccess. On failure, this function returns an error code. You can obtain a more detailed error message with IMAQdxGetErrorString.