ACAPI_​Element_​IsClassificationItemVisibleDefault

Tells whether a classification item is visible for an element default.

    bool  ACAPI_Element_IsClassificationItemVisibleDefault (
        API_ElemTypeID          typeID,
        API_ElemVariationID     variationID,
        const API_Guid&         classificationGuid
    );

 

Parameters

typeID
[in] Type of the default element.
variationID
[in] The element variation that distinguishes the element kinds of the same type.
classificationGuid
[in] The classification item GUID to search for.

 

Return Values

true
The given classification item is visible for the element default. It can return true even if the parent of the classification item is hidden.
false
The given classification item is not visible for the element default or invalid parameters.

Example


GSErrCode GetVisibleClassificationItems (API_ElemTypeID typeId, API_ElemVariationID variationID, GS::Array<API_ClassificationItem>& visibleClassifications)
{
    GS::Array<API_ClassificationItem> definitions;
    GSErrCode error = ACAPI_Classification_GetClassificationItems (APINULLGuid, definitions);
    if (error == NoError) {
        for (UInt32 i = 0; i < definitions.GetSize (); ++i) {
            if (ACAPI_Element_IsClassificationItemVisibleDefault (typeId, variationID, definitions[i].guid)) {
                visibleClassifications.Push (definitions[i]);
            }
        }
    }
    return error;
}
        
For more detailed examples, please see the Classification_Test add-on.

 

Requirements

Version: API 21 or later
Header: ACAPinc.h

 

See Also

Classifications, Classification and Property Visibility