ifcopenshell.api.resource.edit_resource

Module Contents

ifcopenshell.api.resource.edit_resource.edit_resource(file: ifcopenshell.file, resource: ifcopenshell.entity_instance, attributes: dict[str, Any]) None

Edits the attributes of an IfcResource

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

Parameters:
  • resource (ifcopenshell.entity_instance) – The IfcResource entity you want to edit

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

Returns:

None

Return type:

None

Example:

# Add our own crew
crew = ifcopenshell.api.resource.add_resource(model, ifc_class="IfcCrewResource")

# Change the name of the resource to "Zone A Crew"
ifcopenshell.api.resource.edit_resource(model, resource=resource, attributes={"Name": "Foo"})