mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-10 09:48:32 +00:00
Add missing is_manual_drawing_reference getter to Drawing tool
set_manual_drawing_reference existed but the corresponding getter was absent, causing an AttributeError in ui.py line 560. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -2027,6 +2027,10 @@ class Drawing(bonsai.core.tool.Drawing):
|
||||
pset = ifcopenshell.api.pset.add_pset(ifc_file, product=element, name="EPset_Annotation")
|
||||
ifcopenshell.api.pset.edit_pset(ifc_file, pset=pset, properties={"IsManualDrawingReference": True})
|
||||
|
||||
@classmethod
|
||||
def is_manual_drawing_reference(cls, element: ifcopenshell.entity_instance) -> bool:
|
||||
return bool(ifcopenshell.util.element.get_pset(element, "EPset_Annotation", "IsManualDrawingReference"))
|
||||
|
||||
@classmethod
|
||||
def is_document_reference(cls, element: ifcopenshell.entity_instance) -> bool:
|
||||
"""Return True if this annotation links to an external document (not a Bonsai drawing camera)."""
|
||||
|
||||
Reference in New Issue
Block a user