Got a minute? We appreciate your feedback:

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

Python and Morph

Joze Marinko

I want pull out areas from morph.

code is:

from Archicad import ACConnection

conn = ACConnection.connect()
assert conn

acc = conn.commands
act = conn.types
acu = conn.utilities


klasifikacijaGP = acu.FindClassificationItemInSystem('Urbanizem','Gradbena parcela')
elementiGP = acc.GetElementsByClassification(klasifikacijaGP.classificationItemId)
obmocjeGP = acu.GetUserDefinedPropertyId('Gradbena parcela','Območje')

povrsinaGP = acu.GetBuiltInPropertyId('Morph_FloorPlanAreaByStory')

obmocjeSeznamGP = [(acc.GetPropertyValuesOfElements(elementiGP,[obmocjeGP])[i].propertyValues[0].propertyValue.value) for i in range(len(elementiGP))]
povrsinaSeznamGP = [(acc.GetPropertyValuesOfElements(elementiGP,[povrsinaGP])[i].propertyValues[0].propertyValue.value) for i in range(len(elementiGP))]

In variable "povrsinaSeznamGP" I expect list of areas 😞 But I got error message. What is wrong? 




Graphisoft reported this issue as a bug. You can not obtain the area for all stories with this function. It will be fixed in a future release -- if they get to it (IMHO)?


Windows 10 - Visual Studio 2019; ArchiCAD 26

Gerry, thanks for replay. 

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!