2024-01-25 02:49 PM - last edited on 2024-09-17 01:15 PM by Doreena Deng
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
Solved! Go to Solution.
2024-01-29 09:13 PM
Check out the possibleEnumValues field of API_PropertyDefinition. It contains exactly what you are looking for.
2024-01-26 09:34 AM
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
2024-01-29 10:05 AM
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.
2024-01-29 09:13 PM
Check out the possibleEnumValues field of API_PropertyDefinition. It contains exactly what you are looking for.
2024-01-29 10:39 PM
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
2024-02-05 02:51 PM
Indeed, this is the stuff I searched for.
Many thanks.