ifcopenshell.api.unit.remove_unit#

Module Contents#

class ifcopenshell.api.unit.remove_unit.Usecase(file, unit=None)#

Remove a unit

Be very careful when a unit is removed, as it may mean that previously defined quantities in the model completely lose their meaning.

Parameters

unit (ifcopenshell.entity_instance.entity_instance) – The unit element to remove

Returns

None

Return type

None

Example:

# What?
unit = ifcopenshell.api.run("unit.add_context_dependent_unit", model, name="HANDFULS")

# Yeah maybe not.
ifcopenshell.api.run("unit.remove_unit", model, unit=unit)
execute(self)#