Taking a Grasshopper for a Walk

We strive to be a platform agnostic firm, making sure we take advantage of whatever tool seems to fit the job best.  Even so, our two most common tools are Rhino, often with Grasshopper, and Revit.  Typically this has taken the form of Rhino being utilized as a nimble design platform and Revit as a robust documentation platform, leading to the frequent need to take Rhino and/or Grasshopper geometry and translate it in Revit.

The decision on how to transition between platforms usually comes down to the question: “Do we need to transfer the data?”  Sometimes it’s perfectly valid to import geometries without taking the time to translate the data behind them.  Other times it’s important that we create native geometry and data so that we can utilize Revit’s scheduling or to allow further manipulations of the geometry after it’s inserted.  For projects that do require native geometry we then have to decide on the most efficient way to go between software platforms.  Sometimes someone just has to put in the hours to remodel the geometry and input the data, but we’re increasingly trying more sophisticated methods to go between the different platforms.

One of our first attempts to find a better way took place back in 2010 as we developed our first custom tool called Cricket to translate geometry from Grasshopper to Revit.  While Cricket was never demonstrated on this blog, it was mentioned during Part 4 of our Med Mart discussion about facade coordination.  Cricket allowed us to save out family, type, location, and orientation information to a file and then use that information to place families in a Revit project, not unlike more recent workflows we’ve discussed using other third party plugins.

We’ve used third party plugins with a fairly good success rate, but over the last year we’ve found ourselves in need of something that gave us more control over our translation between programs so we’ve come back to the idea started with Cricket.  Making our own tool also allows us the freedom of not only customizing the workflow between GH and Revit, but also to add more platforms as they become necessary.  This also allowed me to find a way to cut out the middle men of interoperability, namely TXT, CSV, and XLS files.  They have a tendency to aggregate in a project folder and it can become difficult to know what the most current or best file to use is, and I prefer to have less places to look for the truth of a design.

GHIO_01

 

Where we’ve wound up at this point is demonstrated in the following video.  The idea is that we have logical data structures within Grasshopper that we can then use to populate other models using objects with comparable intelligence.  So on the Grasshopper side we’re just sending out information in the form of a data tree of text strings that can then be interpreted on the other end by other software using their native API’s.  The first program that we created a receiver for was Revit, allowing us to specify a family type and then identify the incoming lines of data as a point, an orientation, or a parameter and allow Revit to place objects based on this.  We’ve continued our research with Catia (previously here and here) by producing a receiver for Catia V5.  In it’s current implementation it will instantiate a user features based on incoming data and allow you to change parameter values in a part object, but we’re already starting to to implement features to take advantage of Catia V6 and to generate assemblies by placing parts rather than instantiating user features.

Aside from what’s shown above we’re starting to plan other options like flowing the data in the other direction (Revit to GH, Revit to Catia, Catia to GH?) and other platforms we may want to support.  Download the plugins below and give them a shot.

Download LMN Interop Tools, 76.81 kB

10 Comments

  1. Ben says:

    Thanks for the tools. I am trying to get this installed on Revit 2014 but it won’t load the add-in, saying the assembly LMN.Revit.PipeClient.dll cannot be found. Any help you can provide would be much appreciated!

  2. Tim Logan says:

    Ben,

    It looks like I grabbed an older ADDIN file. I’ve updated the files and updated the download. Try downloading the new version, which should be called InteropTools_v1.1.zip, and see if that fixes the problem.

  3. Ben says:

    Thanks for the quick response! That cleared the first error, now it just says: “Revit cannot run the external application “Revit/GH Interop”. Contact the provider for assistance”

    Also, the download link above needs to be updated to point to the new zip file.

  4. clevie says:

    Ben-

    I believe you need to “Unblock” the DLL before it can be run as an Addin in Revit. Find the dll in Explorer, it’s usually in C:\ProgramData\Autodesk\Revit\Addins\2014\ or something like that. Then right-click the LMNts.Interop.RevitIn.dll and select Properties from the drop-down menu. There should a big Unblock button in General Tab (presuming you have administrator access in Windows). Restart Revit and it should work.

  5. Ben says:

    clevie –
    Thanks! Quest #2 is now complete!

    Now the issue is when I try to run the plugin, I immediately get this error:
    System.NullReferenceException: Object reference not set to an instance of an object.
    at LMN.Revit.PipeClient.Commands.Execute(ExternalCommandData commandData, String& message, ElementSet elements)

    Thanks again for the help!

  6. Tim Logan says:

    I’m wondering if something still isn’t correct with the ADDIN file you have. I’ve tested it on a few computers and it’s worked on them.

    In the ADDIN file do you see three sections, two Commands and one Application ? If the Application isn’t successfully registered then the commands won’t work.

  7. Ben says:

    Tim – I am not sure what the issue was initially. I just downloaded the add-in and dll again, then unblocked it before starting up Revit and now it is working like a charm. Thanks again for the help (and the tool), it is much appreciated!

  8. Rory MacTague says:

    Hello,

    I’m getting the following error message: any thoughts?
    Error:
    System.TypeLoadException: Could not load type ‘Autodesk.Revit.DB.Units’ from
    assembly ‘RevitAPl, Version=2013.0.0.0, Culture: neutral, PubIicKeyTol:en= null‘.
    at LMN.Revit.PipeCIient.RequestHandler.Createlnstances(UlApp|ication uiApp)
    at LMN.Revit.PipeClient.RequestHandler.Execute(UlApplication app)

    Thanks in advance,

    Rory

  9. Tim Logan says:

    The Revit part of the command is using parts of the Revit API that were new for the 2014 release so it won’t work on earlier versions. I did port it over to 2013 to use on a project, but it was hastily done and not very reliable so I chose not to release it.
    -Tim

Leave a Comment