Extracting the geometry of revit plates (fabrication elements)

Hi! I’ve been battling with this for some time now, and after trying everything i could think of, i come here.

Is there a way to extract the geometry of a revit steel plate via grasshopper and add it into the rhino model?

This is what i have in my model:

created with this:

Doing the standard “element geometry” gives me nothing. Baking the graphical element itself into the rhino model isn’t a possibility. I’ve tried so many things, alongside with elements parts geometry, Element Location, Element Dependents, even tried adding an analyitcal element to it and NOTHING worked. I’d be satisifed with even just the boundary lines, or the boundary points too.

Does anyone know a solution to this or is this a lost cause?

@HD_RhinoInsideRevit
Have you tried Element View Geometry or Element Preview Component?

yep

the Element View Geometry has a warning “The object reference was not set to an object instance” and the Element Preview one has no warning, but the outputs (meshes,materials,wires) are empty

Hi Try the following code. The steel plates are only visible at the fine level. In order to get the plate brep you need to set the fine detail in revit view then execute the code.


import clr
clr.AddReference("RhinoCommon")
clr.AddReference("RevitAPI")
clr.AddReference("RevitAPIUI")
clr.AddReference("RhinoInside.Revit")

from Rhino.Geometry import *
from RhinoInside.Revit import Revit
from Autodesk.Revit import DB
from RhinoInside.Revit.Convert.Geometry import GeometryEncoder, GeometryDecoder

doc = Revit.ActiveDBDocument

# Execute: bool | Element: DB.Element | View: DB.View
if not Execute:
    Result = None
else:
    try:
        opts = DB.Options()
        opts.IncludeNonVisibleObjects = True

        if View is not None:
            opts.View = View

        Result = []

        for g in Element.get_Geometry(opts):
            items = (
                g.GetInstanceGeometry()
                if isinstance(g, DB.GeometryInstance)
                else [g]
            )

            for s in items:
                if isinstance(s, DB.Solid) and s.Volume > 0:
                    Result.append(GeometryDecoder.ToBrep(s))

    except Exception as e:
        Result = str(e)


hello, why the result is empty?

Did you set the detail level to fine in revit ?

It Worked!!! Thank you so much!!!

For anyone else also doing this - i highly recommend setting a 3D View just for the purpose of this script. Set the visibility and detail inside a template made for this script and never touch it lol (make sure your coworkers also don’t touch it)

Yes, I did, but the result still empty. Could you share the files? Thanks.