Fix #2363. Bug when adding unbuilt schedule to sheet.

This commit is contained in:
Dion Moult
2023-01-27 08:22:10 +11:00
parent c5ae86d10b
commit 9185a51234
3 changed files with 10 additions and 3 deletions
@@ -127,6 +127,8 @@ class SheetBuilder:
def add_schedule(self, reference, schedule, sheet): def add_schedule(self, reference, schedule, sheet):
view_path = tool.Drawing.get_document_uri(schedule) view_path = tool.Drawing.get_document_uri(schedule)
if not os.path.exists(view_path):
tool.Drawing.create_svg_schedule(schedule)
schedule_name = os.path.splitext(os.path.basename(view_path))[0] schedule_name = os.path.splitext(os.path.basename(view_path))[0]
sheet_path = tool.Drawing.get_document_uri(sheet) sheet_path = tool.Drawing.get_document_uri(sheet)
@@ -274,8 +274,12 @@ class BimToolUI:
"IfcDoor", "IfcDoor",
"IfcDoorStandardCase", "IfcDoorStandardCase",
): ):
row = cls.layout.row(align=True) if AuthoringData.data["active_class"] in ("IfcWindow", "IfcWindowStandardCase"):
row.prop(data=cls.props, property="rl", text="RL") row = cls.layout.row(align=True)
row.prop(data=cls.props, property="rl2", text="RL")
elif AuthoringData.data["active_class"] in ("IfcDoor", "IfcDoorStandardCase"):
row = cls.layout.row(align=True)
row.prop(data=cls.props, property="rl1", text="RL")
row = cls.layout.row(align=True) row = cls.layout.row(align=True)
row.label(text="", icon="EVENT_SHIFT") row.label(text="", icon="EVENT_SHIFT")
+2 -1
View File
@@ -23,6 +23,7 @@ import math
import bmesh import bmesh
import mathutils import mathutils
import webbrowser import webbrowser
import subprocess
import numpy as np import numpy as np
import blenderbim.core.tool import blenderbim.core.tool
import blenderbim.core.geometry import blenderbim.core.geometry
@@ -906,4 +907,4 @@ class Drawing(blenderbim.core.tool.Drawing):
element = tool.Ifc.get_entity(obj) element = tool.Ifc.get_entity(obj)
product = cls.get_assigned_product(element) product = cls.get_assigned_product(element)
if product: if product:
tool.Ifc.get_object(product).select_set(True) tool.Ifc.get_object(product).select_set(True)