I would like to get the 3D geometry of elements, especially MEP elements in order to get the volumes and surfaces. I succeed to get the solid geometry of almost everything but I can’t get the geometry of an elbow pipe.
With the usual node “element.geometry”, I get only the arc line of the elbow and not the solid so I tried with this following code.
import clr import math clr.AddReference("RevitServices") import RevitServices from RevitServices.Persistence import DocumentManager from RevitServices.Transactions import TransactionManager doc = DocumentManager.Instance.CurrentDBDocument clr.AddReference("RevitNodes") import Revit clr.ImportExtensions(Revit.Elements) #clr.ImportExtensions(Revit.GeometryConversion) clr.AddReference("RevitAPI") from Autodesk.Revit.DB import * #The inputs to this node will be stored as a list in the IN variables. dataEnteringNode = IN ls = [UnwrapElement(IN)] Solids =  for faminst in ls: Solid =  geo = faminst.GetOriginalGeometry(Options()).GetTransformed(faminst.GetTransform()) for g in geo: #s1 = g.Convert() if g != None: Solid.append(g) Solids.append(Solid) #Assign your output to the OUT variable. OUT = Solids
The result is:
When I try to convert with this code, I get nothing (empty list):
However, if I open the family and open Dynamo from there, the usual node “Element.Geometry” give me the solid.
How to get the 3D geometry directly from the project?
Thank you for the help