IMAQdxEnumerateAttributeValues

NI-IMAQdx Function Reference

IMAQdxEnumerateAttributeValues

Format

rval = IMAQdxEnumerateAttributeValues(IMAQdxSession id, const char *name, IMAQdxEnumItem list [], unsigned int *size);

Purpose

Gets the values supported by the camera attribute.

Note Note  This function applies only to attributes of type IMAQdxAttributeTypeEnum. Use IMAQdxGetAttributeType to get your attribute type.

If you do not know in advance the number of attribute values, complete the following steps:

  1. Call this function with the list parameter set to NULL. The necessary size is then stored in size.
  2. Allocate list with the given size.
  3. Call this function again using the previously allocated array.

Parameters

Parameter Type Description
id IMAQdxSession A valid Session ID, which you can obtain using IMAQdxOpenCamera.
name cont char * The name of the attribute whose values you want to enumerate. Refer to Attribute Name for a list of attributes.
list IMAQdxEnumItem [] The list of attribute values for the attribute specified by name. Set this parameter to NULL to get the size needed by the array in the size parameter.
size unsigned int (passed by reference) The size of attribute values for the attribute specified by name. If the user passes NULL as the list parameter, this parameter contains the needed size.

Parameter Discussion

name specifies the attribute name whose value you want to obtain. In the 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>.

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.