This commit is contained in:
Dion Moult
2023-02-03 21:28:36 +11:00
parent e1e4380fc7
commit b4d633a34d
@@ -75,8 +75,14 @@ def update_diagram_scale(self, context):
if "|" not in scale:
return
human_scale, scale = scale.split("|")
element = tool.Ifc.get_entity(self.id_data)
if not element:
try:
element = (
tool.Ifc.get()
.by_id(self.id_data.BIMMeshProperties.ifc_definition_id)
.OfProductRepresentation[0]
.ShapeOfProduct[0]
)
except:
return
pset = ifcopenshell.util.element.get_psets(element).get("EPset_Drawing")
if pset: