Bringing geometry from Dynamo into Revit

It's been a quiet week on the blogging front, mainly because of the May 1st holiday on Tuesday, but also because I've been heads-down on projects I can't really talk much about.

One thing that does seem worth sharing is an approach we've been using to take geometry from Dynamo into Revit. The project itself relates to the use of Generative Design for urban planning. I can't yet talk about the generative aspect – which is extremely cool – but once the design is basically finalised there's a need to bring the geometry into Revit.

The ideal scenario would be to place Revit families, where that makes sense, but as a first step it was about bringing across basic solid geometry. Revit has a special Dynamo node that does just this: ImportInstance.ByGeometries. It creates solid geometry inside Revit based on the geometry objects passed in. It doesn't do anything interesting with 1D and 2D objects, as far as I've been able to tell, so I've ended up creating a few custom nodes to generate 3D geometry from 1D and 2D objects. For instance, creating a tiny sphere for a point, sweeping a circle along a curve or line to create a tube or cylinder, and thickening surfaces and extruding closed curves. That kind of thing.

The piece I think that's most valuable, in all this, is the approach taken to control what actually comes across into Revit. Previously we were just specifying certain objects as contributing "preview" graphics: only nodes in the display layer are allowed to generate graphics by having their preview flag set. This meant you could easily work out where to go to toggle their display in the preview.

This worked well enough, but was we started looking at Revit import, it seemed to make more sense to collect the objects together and then allow some selection process to take place. This should give some idea of the approach taken… all the objects that will need to be imported into Revit are gathered into a single code-block. Each entry is mapped to an item in a List.Join node: if we want to exclude a particular set of objects from the import process, we wire in a List.Empty node to replace it. The resultant list gets flattened, scaled (if wanting the results in metres rather than inches) and imported into Revit.

Nodes for importing geometry into Revit

One thing I quickly noticed, once this was in place, was that sometimes we really wanted to switch off preview for everything (especially as the geometry was typically previewed in inches and imported in metres… not a great experience). So I ended up creating a similar group that does exactly the same thing for preview graphics. There's now only one node in the graph that can be set to preview, which makes disabling preview graphics in their entirety a complete breeze (aside from the control you have over this from the View menu, of course). And it's much easier to toggle specific objects on and off, too.

Here's the overall graph… you can see two long horizontal groups – the blue one is for preview graphics, the grey one is for importing geometry  into Revit (the right side of which is the above image).

The overall graph

Here's some sample geometry imported into Revit, to give you a sense of how it looks.

Geometry in Revit

If you have alternative approaches for managing display of – and geometry import from – complex graphs, please post a comment. I'd love to hear how others address this.

5 responses to “Bringing geometry from Dynamo into Revit”

  1. Hey Kean, just trying to understand quick.. is Dynamo a sort of FME (Safe Software) specifically designed for Autodesk formats ?

    1. Kean Walmsley Avatar
      Kean Walmsley

      Salut Nico,

      It's a visual programming environment that allows you to generate 3D geometry.

      dynamobim.org

      It's not specifically linked to Autodesk formats but has been integrated with a few of our products (such as Revit).

      Cheers,

      Kean

  2. I must say, I am looking at this post and other forum articles and such, but I feel Dynamo and Revit are not integrated well enough. Sorry for mentioning another product from a different company.
    I understand this is due to the nature of Revit with the BIM structure/system built in.
    However, coming from a Grasshopper background, this type of importing, classifying, and family type data input...etc. becomes a little bit too much at some point.
    I've just tried your team's Space Analysis tool example file too - and that doesn't display in Revit window either.

    I hope Dynamo and Revit can become more integrated like Rhino and Grasshopper... or the connection with Rhino.Inside becomes stronger. There are reasons why architects still use Grasshopper even though Revit and BIM360 are such awesome tools for collaboration...

    1. In all honesty I very rarely use Revit myself: most of the projects I'm involved in are using Dynamo Sandbox. And as I've never used Grasshopper or Rhino I can't really compare them with the Autodesk tools.

      We certainly have work to do to improve the connections between pieces of the stack... but this is something the Dynamo team is working on actively (to the best of my knowledge).

      Kean

      1. Thank you for the response. Glad to know it is being developed !

        I would also like to recommend that you give Grasshopper a try - as a case study perhaps 🙂

        For me I have to use both at my job, so I'm simply giving feedback to a developer.

Leave a Reply to Nico Menu Cancel reply

Your email address will not be published. Required fields are marked *