From 360afe68aa303fe1c2de2ef35ffcb25776025889 Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Wed, 25 Jun 2025 18:40:14 +0500 Subject: [PATCH] sheeter - replace by_id with by_guid No functional changes, just to make it more idiomatic (both `by_id` and `by_guid` end up doing `ifc_file[xxx]` under the hood). --- src/bonsai/bonsai/bim/module/drawing/sheeter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/bonsai/bonsai/bim/module/drawing/sheeter.py b/src/bonsai/bonsai/bim/module/drawing/sheeter.py index ec9dbd1ced..009ce5bcf5 100644 --- a/src/bonsai/bonsai/bim/module/drawing/sheeter.py +++ b/src/bonsai/bonsai/bim/module/drawing/sheeter.py @@ -397,8 +397,8 @@ class SheetBuilder: drawing_id = int(view.attrib["data-id"]) try: reference = tool.Ifc.get().by_id(int(view.attrib["data-id"])) - drawing = tool.Ifc.get().by_id(view.attrib["data-drawing"]) - except: + drawing = tool.Ifc.get().by_guid(view.attrib["data-drawing"]) + except RuntimeError: # Perhaps the SVG has outdated content or is edited externally which we cannot control. continue