diff --git a/src/blenderbim/blenderbim/bim/export_ifc.py b/src/blenderbim/blenderbim/bim/export_ifc.py index 712fc73cdb..5290b1215f 100644 --- a/src/blenderbim/blenderbim/bim/export_ifc.py +++ b/src/blenderbim/blenderbim/bim/export_ifc.py @@ -90,7 +90,7 @@ class IfcExporter: for guid in to_delete: product = self.file.by_id(guid) IfcStore.unlink_element(product) - ifcopenshell.api.run("remove_product", self.file, **{"product": product}) + ifcopenshell.api.run("root.remove_product", self.file, **{"product": product}) def sync_edited_objects(self): for obj_name in IfcStore.edited_objs.copy(): diff --git a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py index 80c9e16004..1a1fcd64a3 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py +++ b/src/ifcopenshell-python/ifcopenshell/api/root/remove_product.py @@ -18,9 +18,9 @@ class Usecase: elif self.settings["product"].is_a("IfcTypeProduct"): representations = [rm.MappedRepresentation for rm in self.settings["product"].RepresentationMaps or []] for representation in representations: - ifcopenshell.api.run("owner.unassign_representation", + ifcopenshell.api.run("geometry.unassign_representation", self.file, **{"product": self.settings["product"], "representation": representation} ) - ifcopenshell.api.run("owner.remove_representation", self.file, **{"representation": representation}) + ifcopenshell.api.run("geometry.remove_representation", self.file, **{"representation": representation}) # TODO: remove object placement and other relationships self.file.remove(self.settings["product"])