type.unassign_type - support batching #4474

This commit is contained in:
Andrej730
2024-04-11 15:52:33 +05:00
parent 5098550399
commit 49e7abb4dc
6 changed files with 99 additions and 26 deletions
@@ -129,10 +129,9 @@ class Usecase:
ifcopenshell.api.run("material.unassign_material", self.file, product=self.settings["product"])
elif inverse.is_a("IfcRelDefinesByType"):
if inverse.RelatingType == self.settings["product"]:
for related_object in inverse.RelatedObjects:
ifcopenshell.api.run("type.unassign_type", self.file, related_object=related_object)
ifcopenshell.api.run("type.unassign_type", self.file, related_objects=inverse.RelatedObjects)
else:
ifcopenshell.api.run("type.unassign_type", self.file, related_object=self.settings["product"])
ifcopenshell.api.run("type.unassign_type", self.file, related_objects=[self.settings["product"]])
elif inverse.is_a("IfcRelSpaceBoundary"):
ifcopenshell.api.run("boundary.remove_boundary", self.file, boundary=inverse)
elif inverse.is_a("IfcRelFillsElement"):