BBIM: Fix bug error when trying to open a drawing rather than a sheet/schedule

This commit is contained in:
Sigma Dimensions
2023-01-21 01:26:26 +01:00
parent 69cee56b7c
commit 9638ae3e77
@@ -187,6 +187,8 @@ class Drawing(blenderbim.core.tool.Drawing):
else:
name = document.DocumentId or "X"
name += " - " + (document.Name or "Unnamed")
if not hasattr(document, "Scope"):
return
if document.Scope == "DOCUMENTATION":
return os.path.join(bpy.context.scene.BIMProperties.data_dir, "sheets", name + ".svg")
elif document.Scope == "SCHEDULE":