replace api.run with static methods

This commit is contained in:
Andrej
2025-06-09 10:59:22 +05:00
parent 02d359d0e6
commit 8b4683aef1
122 changed files with 1334 additions and 1370 deletions
@@ -273,9 +273,11 @@ Here's an example of it in action:
.. code-block:: python
import ifcopenshell.api
ifcopenshell.api.run("grid.create_grid_axis", model, ...)
ifcopenshell.api.run("structural.add_structural_load", model, ...)
import ifcopenshell.api.grid
import ifcopenshell.api.structural
ifcopenshell.api.grid.create_grid_axis(model, ...)
ifcopenshell.api.structural.add_structural_load(model, ...)
Because the API performs all the IFC manipulations to achieve a usecase, no
further interaction is required in a typical native IFC authoring environment.
@@ -62,7 +62,7 @@ Instead, stuff happens in Blender operators.
return IfcStore.execute_ifc_operator(self, context)
def _execute(self, context):
ifcopenshell.api.run("foo.bar", tool.Ifc.get())
ifcopenshell.api.foo.bar( tool.Ifc.get())
return {"FINISHED"}
When your operator manipulates (creates, removes, or edits) IFC data directly or