material.assign_material - update owner history

This commit is contained in:
Andrej730
2024-04-12 12:14:19 +05:00
parent 38a73d6510
commit 32d2f1d629
@@ -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,
}