Got a minute? We appreciate your feedback:

Graphisoft Learn survey
Archicad Python API
About automating tasks in Archicad using the Python API.

Getting all property values of type 'Door' from Archicad 26 project (python)

noriksaroyan
Booster

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! 

1 ACCEPTED SOLUTION
11 REPLIES 11

poco2013
Mentor

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.

 

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 26

Hi Gerry!

Thank you very much for your script. I tried to modify it to include only selected properties, but I might be doing some mistakes. Can you please help? Thank you very much. (attached screenshot)

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)

Hi! Mathias, Thank you very much. Here is the code

Now with the file..

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.

Gerry

Windows 10 - Visual Studio 2019; ArchiCAD 26

Hi Gerry! Thank a lot! 🙂

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

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

 

 

Didn't find the answer?

Check other topics in this Forum

Back to Forum

Read the latest accepted solutions!

Accepted Solutions

Start a new conversation!