Archicad 27 C++ API
Loading...
Searching...
No Matches
API_Property Struct Reference

A container that can store different types of data. More...

#include <APIdefs_Properties.h>

Public Attributes

API_PropertyDefinition definition
 The definition of the property.
 
API_PropertyValueStatus status
 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_PropertyValue 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.
 
bool isDefault
 

Detailed Description

A container that can store different types of data.

Remarks
You can easily convert the evaluated property value to display string with the ACAPI_Property_GetPropertyValueString function. In Archicad 25 the singleEnumVariant and multipleEnumVariant members were removed. In case of enumeration values the keyVariant of the selected enum value is stored in the singleVariant or listVariant member instead. If you need to, you can retrieve the displayVariant or nonLocalizedValue of the enumeration from the property definition's possibleEnumValues member based on the stored keyVariant.

Member Data Documentation

◆ isDefault

API_Property::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.

◆ status

API_Property::status

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.

Status 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.