cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 
Archicad Python API
About automating tasks in Archicad using the Python API.

[PYTHON] Sum area script

Hi everybody!

 

I developped a python script that sum the zone area  with the help of Poco.

 

The script sum all zone of the same zone number and put the result in a custom property. You just have to retrieve the value with a label (example file in the zip).

 

The custom property has to be to string type.

The scrip uses the measured area.

 

SCHEMA.png

 

Capture d’écran 2023-02-27 à 13.52.21.png 

Archicad 27 - GDL - PYTHON
25 REPLIES 25

Dear Jonathan, 

Thank you for this script which solve a big loophole in the whole zones system,
one rather dumb question : I can't seem to find the way to run your python script from the TAPIR addon/palette I have installed following your advice. I am most likely missing something obvious - could you quickly explain the steps to do so ? 

Thank you, 

 

c

Hello Jonathan,

 

The Script is perfekt for us - we use it for multiple Projects and really like it. the New version increased the usability ever further.

 

I Would like to point a problem that Archicad has for decades - the Sum of Areas in an interactive schedule differs from the Sum the archicad built in system or your script gives us.

Thats clearly a rounding error but for some of our customers it's crucial that the sums are exactly the same. The error is in the 2 digit after the comma.

 

Are you aware of this and do you see a way to compensate or even solve this issue?

 

 

 

Archicad 28 | Mac Studio | OS 14.6

Hi pr3 !

I'm well aware of this issue, this is the reason why there is a "Value type" parameter now:

-Displayed Area or Measured Area

 

Did you try this parameter? It is possible that there is a bug because I only use the Displayed Value area. If there is still an error, i'll investigate this.

Archicad 27 - GDL - PYTHON

@Gaberic Where is the problem exactly? Is the script loaded in the Tapir palette?

Archicad 27 - GDL - PYTHON

I have not studied the script, so I can't say how the totals are calculated there.

But in the schedules you do have an option.

Actually the setting is found in Project Preferences > Calculation Rules

BarryKelly_0-1760084699908.png

 

It can total the exact figures you see in the schedule, or the real un-rounded figures that you don't see.

 

Barry.

 

One of the forum moderators.
Versions 6.5 to 27
i7-10700 @ 2.9Ghz, 32GB ram, GeForce RTX 2060 (6GB), Windows 10
Lenovo Thinkpad - i7-1270P 2.20 GHz, 32GB RAM, Nvidia T550, Windows 11
pr3
Advocate

Barry this is it - thank you so much.

 

Archicad 28 | Mac Studio | OS 14.6