ifcopenshell.api.attribute
¶
Submodules¶
Package Contents¶
- ifcopenshell.api.attribute.edit_attributes(file, product=None, attributes=None) 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, optional) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
element = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall") ifcopenshell.api.run("attribute.edit_attributes", model, product=element, attributes={"Name": "Waldo"})