From 6961ca8ce7f67c0cdc69da6635f613414f3a62c5 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Thu, 1 May 2025 17:56:03 +0500 Subject: [PATCH] Fix bug creating a drawing if linked model schema doesn't match the main model schema Co-Authored-By: Thomas Krijnen <1096535+aothms@users.noreply.github.com> --- src/bonsai/bonsai/tool/drawing.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index 096ec7b275..a021b608c4 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -1850,7 +1850,7 @@ class Drawing(bonsai.core.tool.Drawing): if include: elements = ifcopenshell.util.selector.filter_elements(ifc_file, include) else: - if tool.Ifc.get_schema() == "IFC2X3": + if ifc_file.schema == "IFC2X3": base_elements = set(ifc_file.by_type("IfcElement") + ifc_file.by_type("IfcSpatialStructureElement")) else: base_elements = set(ifc_file.by_type("IfcElement") + ifc_file.by_type("IfcSpatialElement"))