Fix #1889. Allow explicitly overriding data types when editing psets.

This commit is contained in:
Dion Moult
2021-11-24 16:37:46 +11:00
parent b4b334145f
commit a1817e8a61
2 changed files with 26 additions and 0 deletions
@@ -38,6 +38,8 @@ class Usecase:
value = self.settings["properties"][prop.Name]
if value is None:
prop.NominalValue = None
elif isinstance(value, ifcopenshell.entity_instance):
prop.NominalValue = value
else:
primary_measure_type = self.get_primary_measure_type(prop.Name, old_value=prop.NominalValue, new_value=value)
prop.NominalValue = self.file.create_entity(primary_measure_type, value)