# Create via Code

## Starting a Model

## Assigning Beams

{% tabs %}
{% tab title="Python" %}

```python
import clr
import sys

clr.AddReferenceToFileAndPath(r"C:\Program Files\Geometry Gym\Rhino7\ggRhinoIFC.dll")

import GeometryGym.Ifc as gg 

from System.Collections.Generic import List
from System import Guid
from Rhino.Geometry import Transform
from Rhino.Geometry import Point3d
from Rhino.Geometry import Vector3d
from Rhino.Geometry import Line
from Rhino.Geometry import Plane

ipe = "IPE300"
db = gg.DatabaseIfc(True,gg.ModelView.Ifc2x3Coordination) 

building = gg.IfcBuilding(db,"PythonBuilding")
project = gg.IfcProject(building,"PythonProject", gg.IfcUnitAssignment.Length.Millimetre)
s355 = gg.IfcMaterial(db,"S355JR") 
s355.Category = "STEEL"
profile = gg.IfcIShapeProfileDef(db,ipe,150,300,7.1,10.7)
profile.FilletRadius = 15
#ifcBeamTypeID = GuidEncoder.Encode(Guid("{FA07940E-19FC-417a-B7F1-09A0CCF39B74}")) 
#Can create a unique identifier if you wish else leave blank

materialProfile = gg.IfcMaterialProfile(ipe,s355,profile)

materialProfileUsage = gg.IfcMaterialProfileSetUsage(materialProfile)

#beamType = gg.IfcBeamType(ipe,mp,gg.IfcBeamTypeEnum.BEAM)
#ln = Line(Point3d(0,0,0),Point3d(1000,0,0)) 
#clipPlanes = List[Plane]()

#beam = gg.IfcBeamStandardCase(building,bt,ln,Vector3d.YAxis, gg.IfcCardinalPointReference.MID,clipPlanes)

axisPlacement = gg.IfcAxis2Placement3D(gg.IfcCartesianPoint(db,0,0,0),gg.IfcDirection(db,1,0,0),gg.IfcDirection(db,0,1,0))

beam = gg.IfcBeamStandardCase(building,materialProfileUsage,axisPlacement,1000)

a = db.ToString(gg.FormatIfcSerialization.STEP)
```

{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://technical.geometrygym.com/rhino-grasshopper/ifc/ifc-grasshopper/create-via-code.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
