ACAPI_​Attribute_​GetPropertyDefinitions

Retrieves all of the built-in property definitions that are available for an attribute.

    GSErrCode  ACAPI_Attribute_GetPropertyDefinitions (
        const API_Attr_Head&                   attrHead,
        GS::Array<API_PropertyDefinition>&     definitions
    );

 

Parameters

attrHead
[in] Header of the attribute. The attribute is identified by typeID and index
definitions
[out] Array of property definitions that are available for a classification of the given attribute.

 

Return Values

NoError
The function has completed with success.
APIERR_BADINDEX
APIERR_DELETED
The attrHead did not refer to a valid attribute.

For other common API errors see the API Errors document.

 

Example


GSErrCode GetPropertyDefinitionNames (API_AttrTypeID attributeTypeID, short attributeIndex, GS::Array<GS::UniString>& names)
{
    API_Attr_Head                     attributeHeader;
    GS::Array<API_PropertyDefinition> definitions;
	
    BNZeroMemory (&attributeHeader, sizeof (API_Attr_Head));
    attributeHeader.typeID = attributeTypeID;
    attributeHeader.index = attributeIndex;
	
    GSErrCode error = ACAPI_Attribute_GetPropertyDefinitions (attributeHeader, definitions);
    if (error == NoError) {
        for (UInt32 i = 0; i < definitions.GetSize (); i++) {
            names.Push(definitions[i].name);
        }
    }

    return error;
}

        
For more detailed examples, please see the Property_Test add-on.

 

Requirements

Version:API 23 or later
Header: ACAPinc.h

 

See Also

Properties,
API Functions