Skip to content

Commit a351832

Browse files
committed
Update code example
1 parent 3283d3d commit a351832

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

website/templates/index.html

+8-7
Original file line numberDiff line numberDiff line change
@@ -201,15 +201,16 @@ <h3> Let's get started </h3>
201201
<div class="item" >
202202
<pre>
203203
<span class="orange-color"># Create a wall on the site</span>
204-
from <span class="green-color">ifcopenshell.api</span> import <span class="green-color">run</span>
204+
import <span class="green-color">ifcopenshell.api.root</span>
205+
import <span class="green-color">ifcopenshell.api.spatial</span>
205206

206-
site = run("<span class="green-color">root.create_entity</span>", model,
207-
ifc_class="IfcSite")
208-
wall = run("<span class="green-color">root.create_entity</span>", model,
209-
ifc_class="IfcWall")
207+
site = <span class="green-color">ifcopenshell.api.root.create_entity</span>(
208+
model, ifc_class="IfcSite")
209+
wall = <span class="green-color">ifcopenshell.api.root.create_entity</span>(
210+
model, ifc_class="IfcWall")
210211

211-
run("<span class="green-color">spatial.assign_container</span>", model,
212-
relating_structure=site, product=wall)
212+
<span class="green-color">ifcopenshell.api.spatial.assign_container</span>(
213+
model, relating_structure=site, products=[wall])
213214
</pre>
214215
</div>
215216
</div>

0 commit comments

Comments
 (0)