Skip to content

Commit

Permalink
Update code example
Browse files Browse the repository at this point in the history
  • Loading branch information
Moult committed Jan 29, 2025
1 parent 3283d3d commit a351832
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions website/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -201,15 +201,16 @@ <h3> Let's get started </h3>
<div class="item" >
<pre>
<span class="orange-color"># Create a wall on the site</span>
from <span class="green-color">ifcopenshell.api</span> import <span class="green-color">run</span>
import <span class="green-color">ifcopenshell.api.root</span>
import <span class="green-color">ifcopenshell.api.spatial</span>

site = run("<span class="green-color">root.create_entity</span>", model,
ifc_class="IfcSite")
wall = run("<span class="green-color">root.create_entity</span>", model,
ifc_class="IfcWall")
site = <span class="green-color">ifcopenshell.api.root.create_entity</span>(
model, ifc_class="IfcSite")
wall = <span class="green-color">ifcopenshell.api.root.create_entity</span>(
model, ifc_class="IfcWall")

run("<span class="green-color">spatial.assign_container</span>", model,
relating_structure=site, product=wall)
<span class="green-color">ifcopenshell.api.spatial.assign_container</span>(
model, relating_structure=site, products=[wall])
</pre>
</div>
</div>
Expand Down

0 comments on commit a351832

Please sign in to comment.