Saving data for selected generative designs from Revit 2021

In the last post we saw how the Data.Gate node can be used to send geometry to Revit 2021 when the “Create Revit Elements” button gets pressed from the Explore Outcomes UI for a Generative Design study. Phew.

In this post we’re going to dig into how this node can also be used to have other “side effects” such as storing the various input parameters to a text file. For the purpose of this workflow I’ve chosen to hack the standard Three Box Massing.dyn graph (which ships with Revit 2021 as a sample for the Generative Design feature).

The general approach I took was to take the graph’s input parameters and combine them into a list that gets encoded as a string. This is the input for the Data.Gate node (actually the second Data.Gate node, as I’ve left the one that controls the Revit geometry creation). When the gate is opened, this string will get appended to an arbitrary text file (which I happen to store at “c:tempdesigns.txt”).

Here’s the modified graph…

Read more