diff --git a/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py b/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py index 579b0c0a7c..185fda0a01 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py +++ b/src/ifcopenshell-python/ifcopenshell/api/geometry/unassign_representation.py @@ -53,4 +53,4 @@ class Usecase: for item in mapped_representations: self.unassign_product_representation(item["product"], item["representation"]) for representation in just_representations: - ifcopenshell.api.run("owner.remove_representation", self.file, **{"representation": representation}) + ifcopenshell.api.run("geometry.remove_representation", self.file, **{"representation": representation}) diff --git a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py index 158a7087b2..38f4c84449 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py +++ b/src/ifcopenshell-python/ifcopenshell/api/type/assign_type.py @@ -71,11 +71,11 @@ class Usecase: ifcopenshell.api.run("geometry.remove_representation", self.file, **{"representation": representation}) for representation_map in self.settings["relating_type"].RepresentationMaps: representation = representation_map.MappedRepresentation - result = ifcopenshell.api.run( + mapped_representation = ifcopenshell.api.run( "geometry.map_representation", self.file, **{"representation": representation} ) ifcopenshell.api.run( "geometry.assign_representation", self.file, - **{"product": self.settings["related_object"], "representation": result} + **{"product": self.settings["related_object"], "representation": mapped_representation} )