mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-17 22:11:36 +00:00
fix error that stopped user from adding properties
This commit is contained in:
@@ -102,9 +102,11 @@ class Usecase:
|
|||||||
if value is None:
|
if value is None:
|
||||||
continue
|
continue
|
||||||
if isinstance(value, ifcopenshell.entity_instance):
|
if isinstance(value, ifcopenshell.entity_instance):
|
||||||
nominal_value = value
|
|
||||||
if value.is_a(True) == "IFC4.IfcPropertyEnumeratedValue":
|
if value.is_a(True) == "IFC4.IfcPropertyEnumeratedValue":
|
||||||
properties.append(value)
|
properties.append(value)
|
||||||
|
continue
|
||||||
|
else:
|
||||||
|
nominal_value = value
|
||||||
#TODO-The following "elif" is temporary code, will need to refactor at some point - vulevukusej
|
#TODO-The following "elif" is temporary code, will need to refactor at some point - vulevukusej
|
||||||
elif isinstance(value, list):
|
elif isinstance(value, list):
|
||||||
for pset_template in self.settings["pset_template"].HasPropertyTemplates:
|
for pset_template in self.settings["pset_template"].HasPropertyTemplates:
|
||||||
@@ -122,6 +124,7 @@ class Usecase:
|
|||||||
EnumerationReference=prop_enum
|
EnumerationReference=prop_enum
|
||||||
)
|
)
|
||||||
properties.append(prop_enum_value)
|
properties.append(prop_enum_value)
|
||||||
|
continue
|
||||||
else:
|
else:
|
||||||
primary_measure_type = self.get_primary_measure_type(name, new_value=value)
|
primary_measure_type = self.get_primary_measure_type(name, new_value=value)
|
||||||
value = self.cast_value_to_primary_measure_type(value, primary_measure_type)
|
value = self.cast_value_to_primary_measure_type(value, primary_measure_type)
|
||||||
|
|||||||
Reference in New Issue
Block a user