ifcopenshell.api.owner.edit_role

Module Contents

ifcopenshell.api.owner.edit_role.edit_role(file: ifcopenshell.file, role: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcActorRole

For more information about the attributes and data types of an IfcActorRole, consult the IFC documentation.

Parameters:
  • role (ifcopenshell.entity_instance) – The IfcActorRole entity you want to edit

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

Returns:

None

Return type:

None

Example:

person = ifcopenshell.api.owner.add_person(model,
    identification="bobthebuilder", family_name="Thebuilder", given_name="Bob")

# By default, the role is an architect
role = ifcopenshell.api.owner.add_role(model, assigned_object=person)

# But Bob is not an architect
ifcopenshell.api.owner.edit_role(model, role=role, attributes={"Role": "CONSTRUCTIONMANAGER"})