"Object reference not set to an instance of an object"

I’m trying to do a basic push of some breps inside a light fixture family in REVIT. As soon as I utilize a revolve (resulting in a closed valid polysurface), it gives me that error “Object reference not set to an instance of an object” and the code is aborted.
Am I missing something?

Let’s start with your about info.

here it is:
Rhino.Inside Revit: 1.23.8907.21534 (2024-05-21T11:57:48)

[Expanded Information]
Rhino: 8.8.24149.15001 (Rhino 8)
Revit: 2025.0 (
CLR: 8.0.6 (8.0.6+3b8b000a0e115700b18265d8ec8c6307056dc94d)
OS: Microsoft Windows NT 10.0.22631.0

Does this work for you?

Rhino.Inside Revit: 1.23.8919.31374 (2024-06-02T17:25:48)

Rhino: 8.9.24156.10001 (Rhino 8)
Revit: 2025.0 (
CLR: 8.0.0 (8.0.0+5535e31a712343a63f5d7d796cd874e563e5ac14)
OS: Microsoft Windows NT 10.0.22631.0

Re_NotSetToObject.gh (4.8 KB)

Ok, one more step: I exploded the polysurf, and the error went away.
So I tried to reassemble it rejoining its parts.
The issue seems in this surface at the base:

If I rejoin it to the little cilindrical adjoining surface and cap the small cilinder, it gives me an error.

If I delete the radial surface and make another planar cap, it works.

Let me check

Oh, that’s just a simple box. Yes, yes, usual topologies work. Extrusions, sweeps, lofts work also… It was an issue with the revolve.
Also rebuilding the whole polysurface of the revolve worked.

@Japhy Is there a way to make Rhino’s revolved surfaces render correctly (as hidden lines) in REVIT?

As a comparison, This is the shaded render.

See this post for more info and suggestions…

Hmmmm ty. I already read the autocad community thread. Revit is one of the worst pieces of software I ever used. Unusable in many ways and overcomplex. Anyway, I rebuilt the sweep in Revit using the sections of Rhino and now it’s ok.
But it remains the fact that organic forms are correctly masked in Revit (you see the white masking against the background in hidden lines mode) but not outlined.