Archicad Python API
About automating tasks in Archicad using the Python API.

[PYTHON] Sum area script

Mathias Jonathan
Advocate

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 

13 REPLIES 13

Glad it worked!

 

There's nothing wrong with using a calculated property to be honest, if you're keeping track of all the created Properties when working with multiple files regarding one project. It can be a nightmare... That's why I tend to minimize the number of Custom Properties and try to find a way to use built-in solutions.

 

I'm still waiting for Graphisoft to address the need to have a centralized file for Attributes, Properties etc. across multiple files. Ability to create Company Standard Files is something I'm really hoping to get resolved soon.

Łukasz Pietraszko
ArchiCAD 26 PL, since AC20 | WIN 10 Home
Intel Core i7-7700HQ 2.8 GHz | 16 GB RAM | NVIDIA GeForce GTX 1060 6 GB | 500 GB SSD

Well as long as Graphisoft continues to add new features that barely make it to 80% done in the first place and

never updates the old features and removes any bugs I just lost hope at this point.

Thats what brought me here in the first place because the zone stamp tool is a real nightmare.

Archicad 28 | Mac Studio | OS 14.6
magdak
Contributor

I really hoped Archicad 28 could count % of areas with new update! 😅 Without need of learning to code in Python 😓

Mathias Jonathan
Advocate

I think that even if graphisoft offer a new tool, it won't be able to answer 100% of our worflow on the matter, it is so diverse!