License delivery maintenance is planned for Saturday, July 26, between 12:00 and 20:00 CEST. During this time, you may experience outages or limited availability across our services, including BIMcloud SaaS, License Delivery, Graphisoft ID (for customer and company management), Graphisoft Store, and BIMx Web Viewer. More details…
2022-09-05 07:39 PM
Hello,
Would there be a way to know if an element is visible or hidden when running a python script?
I'm working on a script that I would like to consider only visible elements (because I can't get their renovation status...)
Thanks in advance,
David
2022-09-06 02:49 AM
You can get the renovation status with:
value = acu.GetBuiltInPropertyId('Category_RenovationStatus')
The Python API does not have available, the visibility of elements but you can get the Layer Name of a element with 'ModelView_LayerName'
Then get the visibility of that Layer with: 'ModelView_IsLayerVisible'
2022-09-06 09:19 AM
Thank you very much Gerry,
This is exactly what I need!
How do you find these values? It would prevent me from disturbing you! 😉
I have a "GetAllPropertyNames" list but I didn't see anything 😞
David
2022-09-06 12:12 PM
TRY:
result = acc.GetAllPropertyNames()
for x in result:
print(x)
You will get a listing of all property names in the console.
The builtin properties are the 'nonlocalizedname' ones
2022-09-06 01:20 PM - edited 2022-09-06 01:20 PM
Thanks for your return
That's what I did but I don't have the properties you are talking about... I only have 'ModelView_LayerName'
Maybe it's because I had Archicad 24? These properties may only be available on 26...
I will try (I have all versions since 5...)
What does mean 'nonlocalizedname'?
Thanks a lot for your help,
David
2022-09-06 01:53 PM
The latest version of the Python API is 26.3000 available via pip install.
Graphisoft divides properties into two categories -- 'builtin' and 'custom'. Custom properties are user created and are specific to a certain category of elements or 'localized'. Builtin properties may be read only or read/write and are generally applicable to all elements or exist for a specific purpose. They are universal or 'nonlocalized'