From 32d2f1d6297fc04d1505945df37664b795203c2b Mon Sep 17 00:00:00 2001 From: Andrej730 Date: Fri, 12 Apr 2024 12:14:19 +0500 Subject: [PATCH] material.assign_material - update owner history --- .../ifcopenshell/api/material/assign_material.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py index d57159cc93..aabbc49a16 100644 --- a/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py +++ b/src/ifcopenshell-python/ifcopenshell/api/material/assign_material.py @@ -245,6 +245,7 @@ class Usecase: related_objects = list(rel.RelatedObjects) related_objects.append(self.settings["product"]) rel.RelatedObjects = related_objects + ifcopenshell.api.run("owner.update_owner_history", self.file, **{"element": rel}) return rel def create_material_association( @@ -254,6 +255,7 @@ class Usecase: "IfcRelAssociatesMaterial", **{ "GlobalId": ifcopenshell.guid.new(), + "OwnerHistory": ifcopenshell.api.run("owner.create_owner_history", self.file), "RelatedObjects": [self.settings["product"]], "RelatingMaterial": relating_material, }