From caa5e8983b926931bc97b806358b49a2036eebc4 Mon Sep 17 00:00:00 2001 From: Dion Moult Date: Thu, 20 Apr 2023 17:34:24 +1000 Subject: [PATCH] Fix #3021. IfcSpatialElements are included in drawings by default. --- src/blenderbim/blenderbim/tool/drawing.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/blenderbim/blenderbim/tool/drawing.py b/src/blenderbim/blenderbim/tool/drawing.py index a80fcf981a..a91930fb68 100644 --- a/src/blenderbim/blenderbim/tool/drawing.py +++ b/src/blenderbim/blenderbim/tool/drawing.py @@ -1338,7 +1338,10 @@ class Drawing(blenderbim.core.tool.Drawing): if include: elements = set(ifcopenshell.util.selector.Selector.parse(ifc_file, include)) else: - elements = set(ifc_file.by_type("IfcElement")) + if tool.Ifc.get_schema() == "IFC2X3": + elements = set(ifc_file.by_type("IfcElement") + ifc_file.by_type("IfcSpatialStructureElement")) + else: + elements = set(ifc_file.by_type("IfcElement") + ifc_file.by_type("IfcSpatialElement")) annotations = tool.Drawing.get_group_elements(tool.Drawing.get_drawing_group(drawing)) elements.update(annotations)