From f0482e7f0cac6410506525c0bae53f50958f4ebf Mon Sep 17 00:00:00 2001 From: Ryan Schultz Date: Sun, 15 Mar 2026 11:34:41 -0500 Subject: [PATCH] Add IsManualDrawingReference to EPset_Annotation Introduces a boolean pset property that marks an ELEVATION or SECTION annotation as manually placed, exempting it from automatic deletion or regeneration during drawing sync. Generated with the assistance of an AI coding tool. --- src/bonsai/bonsai/tool/drawing.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/bonsai/bonsai/tool/drawing.py b/src/bonsai/bonsai/tool/drawing.py index 90e9da970b..b0437e7b65 100644 --- a/src/bonsai/bonsai/tool/drawing.py +++ b/src/bonsai/bonsai/tool/drawing.py @@ -1643,7 +1643,11 @@ class Drawing(bonsai.core.tool.Drawing): @classmethod def is_auto_annotation(cls, element: ifcopenshell.entity_instance): - return element.is_a("IfcAnnotation") and element.ObjectType in ("GRID", "SECTION", "ELEVATION", "SECTION_LEVEL") + if not (element.is_a("IfcAnnotation") and element.ObjectType in ("GRID", "SECTION", "ELEVATION", "SECTION_LEVEL")): + return False + if ifcopenshell.util.element.get_pset(element, "EPset_Annotation", "IsManualDrawingReference"): + return False + return True @classmethod def get_drawing_reference_annotation(