Embedding Revit.Inside to another 3D application

I am researching Revit.Inside for the possibility of embedding it into a 3D CAD application and I cannot grasp how exactly it works. I have watched videos for Revit where Revit objects are selected and recognised by Grasshopper and a 3D preview is also showing within Revit’s viewport together with Revit’s own elements.

Apart from the fact that components aware of the external application’s objects need to be developed, how exactly does the interoperability work? How does Rhino draw its own objects on top of Revit’s objects? Is it possible to do that to another application with a 3D viewport?

Hi Christos,

Rhino.inside is an open source project and has additional examples on Github.

A lot of this is going to depend on the API you are accessing, in Revit’s case its fairly extensive.

Thanks, I have already gone through these examples but they only scratch the surface. What you are getting at is that Rhino.Inside is telling Revit to draw the previews using Revit’s API? For example the transparent red surface taken from an intro video to Rhino.Inside.Revit below.


That is done by using the Revit preview display available in the Revit API. We simply supply the mesh to display. That mesh is part of grasshoppers preview pipeline.

Essentially rhino is loaded as a big dll into the host process. This process needs to be a .net process.

Oncew loaded you have access to all of rhinocommon and the rhino document. But at the same time the host applications API.

What application did you want to try? Is there a c#.net interface into that application?

This makes sense. The possible functionality is in that way tied to the target application and its available API.
The target application has an interface I can use, but another interaction I was wondering about is the selection of Revit elements and association with Grasshopper elements. I imagine the flow as follows:

  1. Right click the GH component to select Revit element
  2. Component tells Revit to initiate selection command via API
  3. Revit comes back with the result of the command
  4. The GH component “understands” the result and stores some data internally

Would that be more or less what’s going on? And in that fashion the whole interaction between Revit and Rhino/GH?

That interaction can be a bit complex. As the trick is to understand the Revit transaction model

There is a lot of information that can be learned about the pragmatic use of Transactions from this blog: https://thebuildingcoder.typepad.com/blog/2018/09/five-secrets-of-revit-api-coding.html

1 Like