How to Prepare a Dynamo Graph for Generative Design for Autodesk® Revit® 2021
Aug 26, 2020 00:00 · 1069 words · 6 minute read
All right. So this is a video to show how to get a dynamo graph out of dynamo and into the generative design tool for Revit 21. so let’s dismiss those right now. what we can do is you need to have some inputs and outputs set up. So this isn’t going to be a tutorial of how to build a graph from scratch right now. It’s more a tutorial. If you have a graph and you want to export it and see what you can do with it, and then iterate from there. This graph is one that we previously had a that’s for packing desks in a room just to see how many desks we can place and things like that.
00:44 - I have a toggle in here that I just added to render fast geometry or not. So let’s go ahead and click run, just to see what this graph does. A few moments later When it’s done running, we’ll see that we have context from our Revit model and some options for packing in desks in this room. this specifically uses BIN packing from a package called Miscellany. maybe in the future, we’ll break this graph down a bit more. It’s pretty large. that’s how they typically get when it comes to these iterative things. So through the generative design tool your graph will get pretty big with options. This one’s a little larger because I have a whole section that just builds context for me. And then also renders out the physical geometry of the desk cubes, if you want to see that. So if I click false for fast geometry and hit run, It’ll think for a moment, but we will see something that’s a little more realistic within dynamo.
01:46 - So then dynamo, it will actually flip the desk correctly. At this point, I’m still fighting through how to get that to display correctly in the generative design tool we avoid columns. And this is bound to a filled region that you pick in Revit at this time. That was what this specific client wanted. So that’s kind of where we’re running with that for now. Instead of using something like a room, rooms would be my preference and we’ll build a graph that does that in the future. these are all inputs. If you right click on the node, you’ll see that it says his input. all these are inputs because I want them to be an option in the generative design tool. In addition to the inputs, we have an output over here for desk count. this specific graph was made back when project refinery was the name of the tool.
02:35 - so that was a little while back and the goal was to fit as many desks as possible. So this is an older graph. We’re just wanting to see how it runs in the generative design tool. At this time. I believe we have a, another, output somewhere over here, for the percent. That these are getting packed. it’s not real easy to see outputs and inputs right now in dynamo. So you just kinda need to group them accordingly. so we’ll see that these goals are my outputs. So percent packed and number of desk clumps. so a desk clump would be a grouping. So in this case, this three is a group. This two is a group. And so on. so with all of that in mind and the logic built out, we’ll just hit save. It’s been ran already, and we can export this to genertative design for Revit. So in the generative design tab, which you should have with Revit 21, we can do export for generative design. we’re going to describe this.
03:36 - So, this graph aims to optimize desk placement. It also provides. Options and iterations something along those lines. you can assign an image to it so that we see a nice image preview inside of the tool. So we’ll go to browse and I have an image already saved. That’ll be my thumbnail. We can choose to keep the cached data. So if you built this on a specific Revit file, you can keep that data within the graph.
04:10 - In my case, I’ll leave that checked since I have a sample file for it. Oh, another thing in this background, preview this abstract art thing that I have going on. That’s a group of chairs and a conference room. That have mesh inside of them. the Dynamo geometry, conversion is doing something very weird with this. And you’ve probably seen this if you’ve tried to get the geometry from railings or stairs as well. we can ignore that for now.
04:38 - I’ll have to build in a fix for that at some point, all the gray stuff’s just for context anyway. so it’s kind of background stuff, but that’s, definitely a bug within the geometry conversion. So we’ll go ahead and click export. Okay. And we’ll see that it exported to the documents folder for the current user. I don’t know of a way to control this, so we just kind of have to deal with that for now. that’s just kinda how it is. Maybe we can control it in the future. If I’m missing something by all means. Let me know within our folder, we’ll see that we have a new graph for optimized desk clumps. So it also takes on the name of the Dyn.
05:19 - So if you don’t have spaces in your file name, it won’t have spaces either, important to keep in mind. It also includes a folder called dependencies. so this includes the packages used, which is really awesome, and it includes the thumbnail and some info So it’s really cool. I wish this is how Dynamo player worked. So this dependencies process is very promising and I hope it’s. Something that could be pulled into other tools. It’s very useful.
05:50 - so now that this is exported, I will look at how to bring this into the generative design tool. but for now, this is how to export it. If you are shipping this up to somebody else, you would end up zipping these two files into a zip file and they would unzip into this folder, which we will also cover. .