diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index c43aa9e73e..1ba78a497d 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -2830,6 +2830,10 @@ class Drawing(bonsai.core.tool.Drawing): def get_sheet_references(cls, drawing: ifcopenshell.entity_instance) -> list[ifcopenshell.entity_instance]: sheet_references: list[ifcopenshell.entity_instance] = [] drawing_reference = cls.get_drawing_document(drawing) + # A drawing with no associated document reference cannot be referenced + # by any sheet, so there is nothing to compare against (see #8036, #7266). + if drawing_reference is None: + return sheet_references for sheet in tool.Ifc.get().by_type("IfcDocumentInformation"): if not sheet.Scope == "SHEET": continue