ifcopenshell.api.attribute.edit_attributes

Module Contents

ifcopenshell.api.attribute.edit_attributes.edit_attributes(file: ifcopenshell.file, product: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edit the attributes of a product

All IFC entities have attributes. Normally they can be edited directly, by simply assigning a new value to them. In some scenarios, you may wish to also ensure that ownership history is updated. This function provides that convenience.

Parameters:
  • product (ifcopenshell.entity_instance) – The product you want to edit. This may be any rooted IFC entity.

  • attributes (dict) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

Example:

element = ifcopenshell.api.root.create_entity(model, ifc_class="IfcWall")
ifcopenshell.api.attribute.edit_attributes(model,
    product=element, attributes={"Name": "Waldo"})