Filter drawing search to only match DRAWING annotations

This commit is contained in:
Ryan Schultz
2025-12-18 12:37:31 -06:00
parent 30dbf48f6d
commit 2ed991ebce
+4 -2
View File
@@ -479,10 +479,12 @@ class BIM_PT_sheets(Panel):
drawingnamesvg = active_sheet.name
drawingname = drawingnamesvg.split(".svg")[0]
ifc_file = tool.Ifc.get()
ifc_annotations = ifc_file.by_type("IfcAnnotation")
drawingid = None
for annotation in ifc_annotations:
for annotation in ifc_file.by_type("IfcAnnotation"):
if annotation.ObjectType != "DRAWING":
continue
Annotation_Name = annotation.Name.replace(",", "") # Remove commas
if Annotation_Name == drawingname:
drawingid = annotation.id()