ifcopenshell.api.unit.add_monetary_unit#

Module Contents#

class ifcopenshell.api.unit.add_monetary_unit.Usecase(file, currency='DOLLARYDOO')#

Add a new currency

Currency units are useful in cost plans to know in what currency the costs are calculated in. The currencies should follow ISO 4217, like USD, GBP, AUD, MYR, etc.

Parameters

currency (str) – The currency code

Returns

The newly created IfcMonetaryUnit

Return type

ifcopenshell.entity_instance.entity_instance

Example:

# If you do all your cost plans in Zimbabwean dollars then nobody
# knows how accurate the numbers are.
zwl = ifcopenshell.api.run("unit.add_monetary_unit", model, currency="ZWL")

# Make it our default currency
ifcopenshell.api.run("unit.assign_unit", model, units=[zwl])
execute(self)#