fix displaying undefined or userdefined units in cost schedules

This commit is contained in:
Sigma Dimensions (Yass)
2023-10-25 15:01:52 +01:00
parent df4cd493ee
commit 48a0d8c508
2 changed files with 6 additions and 2 deletions
@@ -464,6 +464,8 @@ def get_unit_symbol(unit):
if unit.is_a("IfcSIUnit"):
symbol += prefix_symbols.get(unit.Prefix, "")
symbol += unit_symbols.get(unit.Name.replace("METER", "METRE"), "?")
if unit.is_a("IfcContextDependentUnit") and unit.UnitType == "USERDEFINED":
symbol = unit.Name
return symbol