API_​Property

A container that can store different types of data.

    typedef struct {
        API_PropertyDefinition     definition;
        API_PropertyValueStatus    status;
        API_PropertyValue          value;
        bool                       isDefault;
    } API_Property;
    

 

Members

definition
The definition of the property
status New in API 24
Tells whether the property could be evaluated or not. If yes, then the value always contains the evaluated value (independently from the isDefault field). If not, the content of the value field is undefined.

API_PropertyValueStatus

Meaning

API_Property_NotAvailable

The property is not available for the element/attribute. Therefore the content of the value field is undefined.

API_Property_NotEvaluated

The property could not be evaluated for the element/attribute. Therefore the content of the value field is undefined. This may be caused by several things, e.g. the property contains an expression which cannot be evaluated; a static built-in property is currently not evaluable (e.g. composite attribute index cannot be retrieved for a basic wall), etc.

API_Property_HasValue

The property is available for the element/attribute and has been evaluated. The value field contains the evaluated value.

value
The evaluated value of the property. Valid only if the status is API_Property_HasValue, in this case this field always contains the evaluated value even if it’s a default or custom value.
isDefault
Tells whether the value comes from the default value of the property. Note that the value field always contains the evaluated value even if it’s coming from the default value of the property.

 

Requirements

Version: API 20 or later
Header: APIdefs_Properties.h

 

See Also

Properties,
API Types