Replace all ifcopenshell.api.run with ifcopenshell.api static functions.

This commit is contained in:
Dion Moult
2024-06-28 12:36:31 +10:00
parent b5d613989e
commit 07060fc769
432 changed files with 4633 additions and 4856 deletions
@@ -38,10 +38,10 @@ def edit_monetary_unit(file: ifcopenshell.file, unit: ifcopenshell.entity_instan
# 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")
zwl = ifcopenshell.api.unit.add_monetary_unit(model, currency="ZWL")
# Ah who are we kidding
ifcopenshell.api.run("unit.edit_monetary_unit", model, unit=zwl, attributes={"Currency": "USD"})
ifcopenshell.api.unit.edit_monetary_unit(model, unit=zwl, attributes={"Currency": "USD"})
"""
settings = {"unit": unit, "attributes": attributes or {}}