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

Python - Handling Zone information

pedrocollares
Enthusiast

I've been starting to dive into the Python integration in order to put up a few routines regarding zone information in our firm. I'm a little bit familiar with the programming language itself, but I'm clueless on how to get the info from the elements.

 

pedrocollares_0-1647320554151.png

 

I'm starting out with this, to get a list of all Zones in the project. Then there's a few things I need to be able to access in each of those zones. Which are:

 

  • Zone name
  • Layer to which they belong
  • Calculated area
  • Zone category
  • Home Story index
  • Home Story name

 

I'm not even sure if such information is available through the Python integration, though, in case they are, it would be good if I could, inside that 'element' loop assign them to variables so I can handle them across the code.

 

I hope there's a way to do such. Thanks in advance! 🙂

Architect / BIM Manager at IDEIA1 - www.ideia1.com.br
Archicad 26 / Windows 10 64
1 ACCEPTED SOLUTION

Accepted Solutions
Solution

Hi Pedro,

 

There was a discussion about this a few months ago which I think is relevant for what you want to do: https://community.graphisoft.com/t5/Developer-forum/Home-Story-Name-in-Python/m-p/31298

 

It boils down to 2 solutions:

The first option is easier to realize but needs extra steps in each project. The second option needs additional expertise with C++ Add-Ons.

Best, Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: bschwb.com

View solution in original post

3 REPLIES 3
pedrocollares
Enthusiast

Updates on my own thread 😅

 

Apparently all those worked:

 

pedrocollares_0-1647402170070.png

 

They were put out correctly at the listener:

 

pedrocollares_1-1647402206809.png

 

Although, as it seems, there is no Built-in property available to get the Home Story Index. I think I'll handle that by doing a comparison between the elevation to Project Zero and the Project's Story elevation

 

pedrocollares_2-1647402404461.png

 

Anyone has directions on how to obtain those Home Story info?

 

 

 

Architect / BIM Manager at IDEIA1 - www.ideia1.com.br
Archicad 26 / Windows 10 64
Solution

Hi Pedro,

 

There was a discussion about this a few months ago which I think is relevant for what you want to do: https://community.graphisoft.com/t5/Developer-forum/Home-Story-Name-in-Python/m-p/31298

 

It boils down to 2 solutions:

The first option is easier to realize but needs extra steps in each project. The second option needs additional expertise with C++ Add-Ons.

Best, Bernd

Bernd Schwarzenbacher - Archicad Add-On Developer - Get Add-Ons & Archicad Tips on my Website: bschwb.com
pedrocollares
Enthusiast

Indeed, I'm for now going through this direction. Since the routines I mentioned are meant to be used only inside our firm, I think having the need to configure custom properties won't be an issue.

 

Thanks for the response 🙂

Architect / BIM Manager at IDEIA1 - www.ideia1.com.br
Archicad 26 / Windows 10 64