Hi,
I’m using pyRevit to create an offset of the boundary of a ceiling:
def getCeilingGeometry(element):
largestFace = []
area = 0
geoElement = element.get_Geometry(Options())
for geo in geoElement:
for face in geo.Faces:
if (face.Area > area):
largestFace = face
crvSet = []
edgeArray = largestFace.EdgeLoops
# Transaction
t = Transaction(doc, "Create Ceiling Boundary Offset")
t.Start()
for edge in edgeArray[0]:
crv = edge.AsCurve()
crvSet.Add( Curve.CreateOffset(crv, 1, crv.Direction) )
t.Commit()
for crv in crvSet:
print(crv)
return crvSet
The output is:
<Autodesk.Revit.DB.Line object at 0x00000000000017D3 [Autodesk.Revit.DB.Line]>
<Autodesk.Revit.DB.Line object at 0x00000000000017D4 [Autodesk.Revit.DB.Line]>
<Autodesk.Revit.DB.Line object at 0x00000000000017D5 [Autodesk.Revit.DB.Line]>
<Autodesk.Revit.DB.Line object at 0x00000000000017D6 [Autodesk.Revit.DB.Line]>
Not sure why but I can’t see the Lines anywhere in my model. I’m using a Transaction and creating them in Plan View… am I missing something?
Thanks