ACAPI_​Element_​GetPropertyDefinitions

Retrieves all of the property definitions that are available for an element.

    GSErrCode  ACAPI_Element_GetPropertyDefinitions (
        const API_Guid&                        elemGuid,
        API_PropertyDefinitionFilter           filter,
        GS::Array<API_PropertyDefinition>&     propertyDefinitions
    );

 

Parameters

elemGuid
[in] The element’s identifier to search for.
filter API version 22
[in] Filter the list of property definitions (API_PropertyDefinitionFilter_UserDefined, API_PropertyDefinitionFilter_FundamentalBuiltIn, API_PropertyDefinitionFilter_UserLevelBuiltIn, API_PropertyDefinitionFilter_All).
propertyDefinitions
[out] Array of property definitions that are available for a classification of the given element.

 

Return Values

NoError
The function has completed with success.
APIERR_BADID
The elemGuid did not refer to a valid element.

For other common API errors see the API Errors document.

 

Example



GSErrCode GetPropertyDefinitionNames (const API_Guid& elemGuid, GS::Array<GS::UniString>& names)
{
    GS::Array<API_PropertyDefinition> definitions;
    GSErrCode error = ACAPI_Element_GetPropertyDefinitions (elemGuid, API_PropertyDefinitionFilter_UserDefined, 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 20 or later
Header: ACAPinc.h

 

See Also

Properties,
API Functions