Is it possible - Autodesk.DesignScript.Geometry.Face convert to Autodesk.Revit.DB.Face?
im want to take Autodesk.Revit.DB.Face from wall
from
walls_faces=[ [ i, (reduce(lambda x,y:x+y , i.Geometry() )).Faces] for i in walls]
im get Autodesk.DesignScript.Geometry.Face
but need Autodesk.Revit.DB.Face
What does UnwrapElement(IN[0]).ToRevitType() do for you in this instance?
OUT = [i for i in UnwrapElement( reduce (lambda x,y: x+y, IN[0])) .ToRevitType() ]
get error:
‘List[object]’ object has no attribute ‘ToRevitType’
for faces:
OUT = [i.ToRevitType() for i in UnwrapElement( reduce (lambda x,y: x+y, IN[0])) ]
get error:
AttributeError: ‘Face’ object has no attribute ‘ToRevitType’
I am also stuck with the same problem as you, did someone find a specific solution to this problem?
If you are in the Revit API context I dont see what the problem is. Just get the solid from the wall, then get the faces from the solid using solid.Faces. It returns a FaceArray which you can iterate to get each face.
However by the sounds of things you are mixing ProtoGeometry calls with Revit API calls which is never a good idea and would explain why you are getting unexpected results.