We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

Archicad C++ API
About Archicad add-on development using the C++ API.

How to get used attributes of element getting from ACAPI_Element_Get?

Newbie
Participant

Is there anyone know how to get attributes of each element getting from ACAPI_Element_Get and verify whether it is in used or not?

 

2 REPLIES 2
Joel Buehler
Enthusiast

hehey newbie, waht do you mean with "in use"? do you mean: 

 

1. if the property is available for a element?

 

2. if the property has its default value? 

 

 

1. works like this:

you call "ACAPI_​Element_​GetPropertyDefinitions" to get the available properties for a element

if a property is not available, you wont recive the propertydefinition of that property. 

 

2. works like this:

with the call "ACAPI_​Element_​GetPropertyValues" you get the "API_Property" struct

this has a member called "isDefault;" that member tells you if the property has its default value or a custom value set by the user or a api call. 

 

https://archicadapi.graphisoft.com/documentation/api_property

Hi Joel Buehler,

 

Actually my query is related to Attribute, knowing each attribute if in used it has to be tie to the element that use it. After getting the element list, I want to check if the element use such attribute or not. For example below, how AC know such attribute is 'InUse'?.

 

I am not sure whether my understanding is correct or not.

Please advise.

 

Screenshot 2023-09-05 114906.png