ACAPI_​Element_​IsPropertyDefinitionAvailableDefault

Tells whether a property definition is available for an element default.

    bool  ACAPI_Element_IsPropertyDefinitionAvailableDefault (
        API_ElemTypeID          typeID,
        API_ElemVariationID     variationID,
        const API_Guid&         propertyGuid
    );

 

Parameters

typeID
[in] Type of the default element.
variationID
[in] The element variation that distinguishes between the element kinds of the same type.
propertyGuid
[in] The property definition GUID to search for.

 

Return Values

true
The given property definition is available for the element default.
false
The given property definition is not available for the element default.

Example


GSErrCode GetAvailablePropertyDefinitions (API_ElemTypeID typeId, API_ElemVariationID variationID, GS::Array<API_PropertyDefinition>& availableProperties)
{
    GS::Array<API_PropertyDefinition> definitions;
    GSErrCode error = ACAPI_Property_GetPropertyDefinitions (APINULLGuid, definitions);
    if (error == NoError) {
        for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
            if (ACAPI_Element_IsPropertyDefinitionAvailableDefault (typeId, variationID, definitions[i].guid)) {
                availableProperties.Push (definitions[i]);
            }
        }
    }
    return error;
}
        

Note: this example function is identical to calling ACAPI_Element_GetPropertyDefinitionsOfDefaultElem, and you should use it if you need this functionality.

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

 

Requirements

Version: API 21 or later
Header: ACAPinc.h

 

See Also

Properties,
API Functions