2023-03-16 01:22 PM - edited 2023-03-16 03:54 PM
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 01:47 PM
Not sure why you need ALL parameters for doors? There are over 170 'normal' parameters for doors and a additional number of 'special' parameters. List all of those parameters is very complicate as each has its own listing format which would make the script long and complicated Better to just list the ones you need and use the standard recover functions. .
I have attached a script to list all the parameters which have a normal status. Looking at that script should get you started.
2023-03-17 03:23 PM
2023-03-17 03:29 PM
I think there is at least a comma at the end of your "propertyIds" thaht should'nt be here. I'm not sure that this is the only problem.
(You should share the code and not a screenshot to help to debug it)
2023-03-17 03:32 PM
Hi! Mathias, Thank you very much. Here is the code
2023-03-17 03:34 PM
2023-03-17 07:01 PM
Line 38 is incorrect since you already defined the property Ids. Delete this section and just set
propIds = propertyIds --- see attached The function getpropertyIds does not take a element(s) (improper usage)
Delete everything after line 69 --- not needed.
2023-03-17 07:04 PM
Hi Gerry! Thank a lot! 🙂
2023-03-17 08:33 PM
Sorry, my bad in describing the problem. I need to open a request to manufacturers after getting the attributes of the doors.
For instance: we have a wooden door, 2,2 meters height and 1.2 meters width. I need to retrieve all these attributes and then I have to insert it to Json file, so I need to get those properties separate(width=1.2 length=2,2, material="Wood") to map it into an object and then convert those objects into a json file
2023-03-17 09:07 PM
I'm encountering these errors while running your code:
Property definition not found by localized name (groupName: "Calculation data", name : "Doors - frame length
Property definition not found by localized name (groupName: "Calculation data", name : "Doors - interior casing volume
Property definition not found by localized name (groupName: "Calculation data", name : "Doors - exterior casing volume
Property definition not found by localized name (groupName: "Calculation data", name : "Doors - frame area