New assign / unassign declaration usecase, minor code & formatting cleanup

This commit is contained in:
Dion Moult
2021-04-07 13:15:16 +10:00
parent 13d4a99358
commit ae0789e4ec
25 changed files with 289 additions and 228 deletions
@@ -27,7 +27,7 @@ class Usecase:
pset = self.file.create_entity(
"IfcPropertySet", **{"GlobalId": ifcopenshell.guid.new(), "Name": self.settings["Name"]}
)
has_property_sets = list(self.settings["product"].HasPropertySets)
has_property_sets = list(self.settings["product"].HasPropertySets or [])
has_property_sets.append(pset)
self.settings["product"].HasPropertySets = has_property_sets
elif self.settings["product"].is_a("IfcMaterialDefinition"):