ACAPI_​Element_​IsPropertyDefinitionVisible

Tells whether a property definition is visible for an element.

    bool  ACAPI_Element_IsPropertyDefinitionVisible (
        const API_Guid&     elemGuid,
        const API_Guid&     propertyGuid
    );

 

Parameters

elemGuid
[in] The element GUID to search for.
propertyGuid
[in] The property definition GUID to search for.

 

Return Values

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

Example


GSErrCode GetVisiblePropertyDefinitions (const API_Guid& elemGuid, GS::Array<API_PropertyDefinition>& visibleProperties)
{
    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_IsPropertyDefinitionVisible (elemGuid, definitions[i].guid)) {
                visibleProperties.Push (definitions[i]);
            }
        }
    }
    return error;
}
        
For more detailed examples, please see the Property_Test add-on.

 

Requirements

Version: API 21 or later
Header: ACAPinc.h

 

See Also

Properties, Classification and Property Visibility