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?
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:
Right click the GH component to select Revit element
Component tells Revit to initiate selection command via API
Revit comes back with the result of the command
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?