ifcopenshell.api.owner.edit_role

Module Contents

ifcopenshell.api.owner.edit_role.edit_role(file, role=None, attributes=None) 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, optional) – a dictionary of attribute names and values.

Returns:

None

Return type:

None

Example:

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

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

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