From 457c97e6809f6d37ba1055020df137a99a8f2f1c Mon Sep 17 00:00:00 2001 From: Stephen Boddy Date: Fri, 1 Nov 2024 22:20:17 +0000 Subject: [PATCH] Fix Schedules and References not incrementing the ID number properly --- src/bonsai/bonsai/bim/module/drawing/operator.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index 2786f09b1b..0504973e85 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -1496,7 +1496,7 @@ class AddDrawingToSheet(bpy.types.Operator, tool.Ifc.Operator): attributes = tool.Drawing.generate_reference_attributes( reference, Identification=str( - len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "SCHEDULE")]) + 1 + len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "SCHEDULE", "REFERENCE")]) + 1 ), Location=drawing_reference.Location, Description="DRAWING", @@ -2299,7 +2299,7 @@ class AddScheduleToSheet(bpy.types.Operator, tool.Ifc.Operator): attributes = tool.Drawing.generate_reference_attributes( reference, Identification=str( - len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "SCHEDULE")]) + 1 + len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "SCHEDULE", "REFERENCE")]) + 1 ), Location=schedule_location, Description="SCHEDULE", @@ -2355,7 +2355,7 @@ class AddReferenceToSheet(bpy.types.Operator, tool.Ifc.Operator): attributes = tool.Drawing.generate_reference_attributes( reference, Identification=str( - len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "REFERENCE")]) + len([r for r in references if tool.Drawing.get_reference_description(r) in ("DRAWING", "SCHEDULE", "REFERENCE")]) + 1 ), Location=extref_location,