mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-25 17:57:02 +00:00
fix for issue #2261
This commit is contained in:
@@ -106,7 +106,11 @@ class Usecase:
|
|||||||
properties.append(value)
|
properties.append(value)
|
||||||
continue
|
continue
|
||||||
else:
|
else:
|
||||||
nominal_value = value
|
properties.append(
|
||||||
|
self.file.create_entity(
|
||||||
|
"IfcPropertySingleValue",
|
||||||
|
**{"Name": name, "NominalValue": 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:
|
||||||
@@ -130,12 +134,12 @@ class Usecase:
|
|||||||
value = self.cast_value_to_primary_measure_type(value, primary_measure_type)
|
value = self.cast_value_to_primary_measure_type(value, primary_measure_type)
|
||||||
nominal_value = self.file.create_entity(primary_measure_type, value)
|
nominal_value = self.file.create_entity(primary_measure_type, value)
|
||||||
|
|
||||||
properties.append(
|
properties.append(
|
||||||
self.file.create_entity(
|
self.file.create_entity(
|
||||||
"IfcPropertySingleValue",
|
"IfcPropertySingleValue",
|
||||||
**{"Name": name, "NominalValue": nominal_value},
|
**{"Name": name, "NominalValue": nominal_value},
|
||||||
|
)
|
||||||
)
|
)
|
||||||
)
|
|
||||||
return properties
|
return properties
|
||||||
|
|
||||||
def extend_pset_with_new_properties(self, new_properties):
|
def extend_pset_with_new_properties(self, new_properties):
|
||||||
|
|||||||
Reference in New Issue
Block a user