mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-22 06:58:38 +00:00
smol fix
This commit is contained in:
committed by
Thomas Krijnen
parent
1ecb25684e
commit
d31b470e83
@@ -182,7 +182,7 @@ class Usecase:
|
|||||||
|
|
||||||
def _try_purge(self, prop) -> bool:
|
def _try_purge(self, prop) -> bool:
|
||||||
"""
|
"""
|
||||||
Tried to remove the property
|
Tries to remove the property
|
||||||
if successful, returns True, otherwise False
|
if successful, returns True, otherwise False
|
||||||
NOTE: Assumes the prop exists
|
NOTE: Assumes the prop exists
|
||||||
"""
|
"""
|
||||||
@@ -280,11 +280,11 @@ class Usecase:
|
|||||||
|
|
||||||
# If it's not an entity, then it's a primitive data type
|
# If it's not an entity, then it's a primitive data type
|
||||||
elif not value.is_entity():
|
elif not value.is_entity():
|
||||||
args = {"Name": name, "NominalValue": value}
|
kwargs = {"Name": name, "NominalValue": value}
|
||||||
if unit:
|
if unit:
|
||||||
args["Unit"] = unit
|
kwargs["Unit"] = unit
|
||||||
properties.append(
|
properties.append(
|
||||||
self.file.create_entity("IfcPropertySingleValue", **args)
|
self.file.create_entity("IfcPropertySingleValue", **kwargs)
|
||||||
)
|
)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
@@ -303,14 +303,14 @@ class Usecase:
|
|||||||
raise ValueError(f"pset template '{pset_template.Name}' is missing PrimaryMeasureType")
|
raise ValueError(f"pset template '{pset_template.Name}' is missing PrimaryMeasureType")
|
||||||
|
|
||||||
properties.append(
|
properties.append(
|
||||||
self.file.create_entity(
|
self.file.create_entity(
|
||||||
"IfcPropertyListValue",
|
"IfcPropertyListValue",
|
||||||
Name=name,
|
Name=name,
|
||||||
ListValues=[
|
ListValues=[
|
||||||
self.file.create_entity(ifc_class, v)
|
self.file.create_entity(ifc_class, v)
|
||||||
for v in value
|
for v in value
|
||||||
],
|
],
|
||||||
Unit=unit
|
Unit=unit
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
break
|
break
|
||||||
|
|||||||
Reference in New Issue
Block a user