From 679c2bef02214d0cfd49e4c7500a2478d890b59b Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 3 Dec 2020 21:52:17 +1100 Subject: [PATCH] Fix bug where aggregates cause drawing generation to fail --- src/ifcblenderexport/blenderbim/bim/cut_ifc.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcblenderexport/blenderbim/bim/cut_ifc.py b/src/ifcblenderexport/blenderbim/bim/cut_ifc.py index 37d79afe6a..f7e86f81bc 100644 --- a/src/ifcblenderexport/blenderbim/bim/cut_ifc.py +++ b/src/ifcblenderexport/blenderbim/bim/cut_ifc.py @@ -652,6 +652,8 @@ class IfcCutter: for element in ifc_file.by_type("IfcElement"): annotation_representation = None box_representation = None + if not element.Representation: + continue # This can occur for aggregates for representation in element.Representation.Representations: if ( representation.ContextOfItems.ContextType == "Plan"