From f92482eb46eb70a5711b6140b3c6b3f000175abd Mon Sep 17 00:00:00 2001 From: Youen Date: Mon, 5 Feb 2024 19:11:49 +0100 Subject: [PATCH] Fixed error when a document has multiple "main" objects --- ahb_techdraw_extensions.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ahb_techdraw_extensions.py b/ahb_techdraw_extensions.py index 0aec94f..9006e86 100644 --- a/ahb_techdraw_extensions.py +++ b/ahb_techdraw_extensions.py @@ -800,9 +800,9 @@ class TechDrawExtensions: if obj.TypeId == 'TechDraw::DrawPage': self.onPageLoaded(obj) - main_part = doc.getObjectsByLabel(doc.Name) - if len(main_part) == 1: - main_part = main_part[0] + main_parts = doc.getObjectsByLabel(doc.Name) + if len(main_parts) == 1: + main_part = main_parts[0] except: pass