ifcopenshell.api.unit.edit_named_unit

Module Contents

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

Returns:

None

Return type:

None

Example:

# Boxes of things
unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="BOXES")

# Uh, crates? Boxes? Whatever.
ifcopenshell.api.run("unit.edit_named_unit", model, unit=unit, attibutes={"Name": "CRATES"})