Allow deletion of user-placed SECTION_LEVEL/PLAN_LEVEL annotations

is_auto_annotation now returns False for SECTION_LEVEL/PLAN_LEVEL annotations
that carry a BBIM_Dimension pset, which is always written by _do_write_anchor
during AddElevationAnnotation placement. Auto-generated elevation annotations
(no BBIM_Dimension pset) remain protected from deletion.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Ryan Schultz
2026-06-28 13:15:16 -05:00
parent 904a4df651
commit 6be06bb6c5
+3
View File
@@ -1650,6 +1650,9 @@ class Drawing(bonsai.core.tool.Drawing):
return False
if ifcopenshell.util.element.get_pset(element, "EPset_Annotation", "IsManualDrawingReference"):
return False
ptype = ifcopenshell.util.element.get_predefined_type(element)
if ptype in ("SECTION_LEVEL", "PLAN_LEVEL") and ifcopenshell.util.element.get_pset(element, "BBIM_Dimension"):
return False
return True
@classmethod