hi @johnmirts , i guess that the old python example you posted a while ago is not working with the your current IFC library.
I tried to adapt it to the current version of the library without success.
I was able to output what it looks an express code, but no ifc viewer is capable of interpret this…
Some working example for python with the currect IFC library version would be much appreciated.
import clr
import sys
#sys.path.append(r"C:\Program Files (x86)\Geometry Gym\Rhino3d")
#clr.AddReference("ggRhinoIFC.dll")
clr.AddReferenceToFileAndPath(r"C:\Users\aleceta\Source\Repos\GeometryGymIFC\DLL Projects\GeometryGymIFCRhinoCommonx64\bin\GeometryGymIFCRhinoCommonx64.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(db,"PythonProject")
s355 = gg.IfcMaterial(db,"S355JR")
s355.Category = "STEEL"
pd = gg.IfcIShapeProfileDef(db,ipe,300,150,7.1,10.7,15)
#ifcBeamTypeID = GuidEncoder.Encode(Guid("{FA07940E-19FC-417a-B7F1-09A0CCF39B74}"))
#Can create a unique identifier if you wish else leave blank
mp = gg.IfcMaterialProfile(ipe,s355,pd)
mpUsage = gg.IfcMaterialProfileSetUsage(mp)
#bt = gg.IfcBeamType(ipe,mp,gg.IfcBeamTypeEnum.BEAM)
ln = Line(Point3d(0,0,0),Point3d(1,0,0)) #use SI units ie metres
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,0,1,0),gg.IfcDirection(db,0,0,1))
beam = gg.IfcBeamStandardCase(building,mpUsage,axisPlacement,10)
a = db.ToString()
gg.DatabaseIfc.WriteFile(db,'testFile')