We value your input! Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey
2023-09-28 02:28 AM - last edited on 2024-09-26 01:49 PM by Doreena Deng
Hello. I have what I hope is an easy request. I want to determine the renovation status of the parent element in an associated label. My purpose is simple: If the parent is Existing or Demo I want the label to appear one way, if it is New a different appearance. I found the request in the reference guide <n = APPLICATION_QUERY (extension_name, "GetParameter(parID)", parValue)> but I'm confused by the (parID) part and am hoping someone can post a code snip as an example. Thanks.
2023-09-28 01:03 PM - edited 2023-09-28 01:06 PM
Hi Geoff!
It's indeed nowhere directly documented what to put there as arguments. It's kind of hidden behind this code:
https://gdl.graphisoft.com/reference-guide/application-query-options#idm7974181136
I ran the code from the gdl reference guide above to get the actual parID
.
After simplifying it to only the renovation status (and changing the extension_name to ParentCustomParameters
), you get something like:
parValue = ""
n = APPLICATION_QUERY ("ParentCustomParameters", "GetParameter(Renovation.RenovationStatus)", parValue)
text2 0, 0, "RenovationStatus: " + parValue
Hope that helps!
Bernd
2023-09-28 07:35 PM
Thank you Bernd, I will give that a try.