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…
2023-03-16
01:22 PM
- last edited on
2024-09-26
12:11 PM
by
Doreena Deng
Hi everyone! I'm new to both python and archicad API and I'm having troubles with retrieving property values of certain elements(doors, in this case). I would appreciate a little help.
I'm using archicad26 with python 3.8.9. The code I'm using is attached below
P.S. By saying properties i mean height, width, type(single-leaf, double-leaf, sliding, and revolving doors), thickness, material(leaf and frame: for example, wood, glass, metal), оperation(swing direction, pivot point and rotation angle), Hardware(placement of glazing).
Thanks in advance!
Solved! Go to Solution.
2023-03-17 10:03 PM
Hi, I guess that's because those are properties defines by me. Please use the
2023-03-18 04:19 AM
In reference to including properties in a Json file: I have included an example for anyone interested. It is really just a couple of lines. i did not brother to include all the properties mentioned, I'll leave that to you, as I think there are enough examples out there. I just picked a few from the previous examples. Note that Graphisoft's data availability is so 'screwy' that finding all of the properties is always a chore.
Basically one creates a Python dictionary and then converts that to a Json file which is just a one line function. Note that only the standard units can be converted (strings,int,float,arrays,bools, etc.). See the documentation.
This bring up a problem in that, some properties in Archicad return a object not a standard unit. One would have to iterate to the standard unit in those cases. That is why I just converted all the responses to a string-- see the example. If this would not be acceptable, then you would have to dig deeper.
BTW -- a better route might be to just create a schedule and then dump it to a excel file in Archicad