cancel
Showing results for 
Search instead for 
Did you mean: 
EN
cancel
Showing results for 
Search instead for 
Did you mean: 
Sam Karli
Advocate

Getting value of built-in properties by their GUID

Elements have, like, Renovation Status that can be accessed as built in properties. In many cases these properties have GUIDs as values. Is it possible to get some more info from these values?

Like "57E66097-9C38-8012-D9C7-0CA01AA5EB1E" as a string: "To Be Demolished"?

 

Thanks in advance

GDL/Python/C++ dev
1 Solution

Accepted Solutions
Viktor Kovacs
Graphisoft
Graphisoft

Check out the possibleEnumValues field of API_PropertyDefinition. It contains exactly what you are looking for.

Go to post

5 Replies 5

Hi Sam,


The renovation status specifically can be obtained from every element from there head (See API_ElemHead).

Also for reference there's a whole module to handle Renovation Filters.

 

Also if you have the GUID of the built-in property it might also be able to obtain the values via the properties api calls.

 

Hope that helps,

Bernd

Automating Archicad with Add-Ons, GDL-Objects & Python Archi-XT.com
Sam Karli
Advocate

On selected object's Settings/Classification/Properties I see the, like, renovation status and the Properties/Classifications besides each other and I'm about to kind of recreate this UI stuff. This is the reason I want to reach Renovation status etc. through Properties and not via ElemHead.

On the other hand, in ElemHead there is a renovationStatus field that is of API_RenovationStatusType that tells me that there is only four (4) types including the Undefined one, so it is safe to set up a GS::HashTable to map GUIDs to GS::UniStrings. Not elegant, but works.

Note that there are some other fields that I can reach the same way through as a GUID property, and can convert into displayable strings (Position and Structural Function, currently), and it would be another burden to get them but it is more straightforward to use a built in mapping.

Not elegant, I understand.

GDL/Python/C++ dev
Viktor Kovacs
Graphisoft
Graphisoft

Check out the possibleEnumValues field of API_PropertyDefinition. It contains exactly what you are looking for.

poco2013
Mentor

FYI: If you are just interested in the values of BuiltIn properties, check out the Dev. Kit Example Property_Test, specifically the Function: SavePropertyValuesOf Element( ). It returns all the property values and Definitions. i use this function to return all the built in values in one single command to a Python script. It is extremely fast

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27
Sam Karli
Advocate

Indeed, this is the stuff I searched for.

Many thanks.

GDL/Python/C++ dev

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!