ACAPI_​Attribute_​GetNum

Returns the number of instances of a given type of attribute.

    GSErrCode  ACAPI_Attribute_GetNum (
        API_AttrTypeID       typeID,
        API_AttributeIndex*  count
    );

 

Parameters

typeID
[in] Type of the attribute.
count
[out] The number of attributes in the database for the given attribute type.

 

Return Values

NoError
The function has completed with success.
APIERR_BADPARS
The passed parameter is nullptr; count
APIERR_BADID
The attribute type is invalid

For other common API errors see the API Errors document.

 

Remarks

This function returns the highest available attribute index of the given attribute type. You can then use the returned information to browse all of the attributes.

 

Example


API_AttributeIndex  ltypeNum;
GSErrCode           err;

/* find out how many linetypes we have */

err = ACAPI_Attribute_GetNum (API_LinetypeID, &ltypeNum);

 

Requirements

Version: API 1.3 or later
Header: ACAPinc.h

 

See Also

API_AttrTypeID, API_AttributeIndex,
Attribute Manager, API Functions