We value your input!
Please participate in Archicad 28 Home Screen and Tooltips/Quick Tutorials survey

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

Python and Morph

Joze Marinko
Contributor

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? 

2 REPLIES 2
poco2013
Mentor

FYI:

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)?

Gerry

Windows 11 - Visual Studio 2022; ArchiCAD 27

Gerry, thanks for replay.