Module Contents

ifcopenshell.api.owner.update_owner_history.update_owner_history(file: ifcopenshell.file, element: ifcopenshell.entity_instance) ifcopenshell.entity_instance | None

Updates the owner that is assigned to an object

This ensures that the owner is tracked to have modified the object last, including the time when the change occured. See ifcopenshell.api.owner.create_owner_history for details.


element (ifcopenshell.entity_instance) – The IfcRoot element to update the ownership details on when a change is made.


The updated IfcOwnerHistory element.

Return type:



# See ifcopenshell.api.owner.create_owner_history for setup
# [ ... example setup code ... ]

# We've finished our ownership setup. Now let's start our script and
# create a space. Notice we don't actually call
# create_owner_history at all. This is already automatically handled
# by the API when necessary. Under the hood, the API is actually
# running this code on the IfcSpace element:
# element.OwnerHistory = ifcopenshell.api.run("owner.create_owner_history", model)
space = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcSpace")

# Any edits we make will have ownership tracking automatically
# applied. There is no need to run any owner.update_owner_history
# API calls either.
ifcopenshell.api.run("attribute.edit_attributes", model, product=space, attributes={"Name": "Lobby"})