ifcopenshell.api.unit.edit_named_unit
¶
Module Contents¶
- ifcopenshell.api.unit.edit_named_unit.edit_named_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instance, attributes: dict[str, Any]) None ¶
Edits the attributes of an IfcNamedUnit
Named units include SI units, conversion based units (imperial units), and context dependent units.
For more information about the attributes and data types of an IfcNamedUnit, consult the IFC documentation.
- Parameters:
unit (ifcopenshell.entity_instance) – The IfcNamedUnit entity you want to edit
attributes (dict) – a dictionary of attribute names and values.
- Returns:
None
- Return type:
None
Example:
# Boxes of things unit = ifcopenshell.api.unit.add_context_dependent_unit(model, name="BOXES") # Uh, crates? Boxes? Whatever. ifcopenshell.api.unit.edit_named_unit(model, unit=unit, attibutes={"Name": "CRATES"})