mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-30 16:43:00 +00:00
replace api.run with static methods
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user