Browse Source

Fixed error when a document has multiple "main" objects

master
Youen 9 months ago
parent
commit
f92482eb46
  1. 6
      ahb_techdraw_extensions.py

6
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

Loading…
Cancel
Save