mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-06 07:51:47 +00:00
Filter drawing search to only match DRAWING annotations
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user