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
@@ -61,10 +61,10 @@ def reassign_class(
.. code:: python
# We have a wall.
wall = ifcopenshell.api.run("root.create_entity", model, ifc_class="IfcWall")
wall = ifcopenshell.api.root.create_entity(model, ifc_class="IfcWall")
# Oh, did I say wall? I meant slab.
slab = ifcopenshell.api.run("root.reassign_class", model, product=wall, ifc_class="IfcSlab")
slab = ifcopenshell.api.root.reassign_class(model, product=wall, ifc_class="IfcSlab")
# Warning: this will crash since wall doesn't exist any more.
print(wall) # Kaboom.