Generative Design Issues- Revit Dependent Nodes

I am working on a generative design project in which I have generated a house footprint with variable roof types, floor types, etc using dynamo coding. I am now trying to put it into Generative Design. However, there is 1 error associated with many of my nodes. It says that these nodes are revit dependent and cannot be used in the evaluation loop. However, I can’t get rid of these nodes as they are all integral to the footprint of my model. Is there something I can do to make this error go away? I looked on the Autodesk forum and all it said was to “ensure that all required Revit data is selected before any variable inputs.” However, I’m not sure how to do this since many of my nodes require variable inputs after the Revit data has been selected due to the nature of the nodes. This screenshot shows one of the problem nodes along with the error in question. I am also very new to Revit, Dynamo, and Generative Design, so please explain in entry-level terms. Thank you.

Do you have a bigger image of your graph?

The help documentation is accurate;

Generative Design is meant to use in a Dynamo sandbox environment to generate outcomes outside of the Revit platform, which is doable but will require you rethink how your graph is working. The reason for the sandbox perspective is because of the platform itself. For Dynamo to interact with Revit you need to launch a new Revit session; which take times. That separate Revit session would have to open the model you’re working on, which takes more time. That Revit session would then need to launch Dynamo for Revit (+time), and all the associated libraries (+time) and then open the graph, set the variables and execute the results (+time) before undoing the work and repeating a section of the process. In a 10x20 optimization study that is 200 graphs to open, 200 undos, and 200 times that Revit can just say ‘nope’ and crash on you before a result is returned because the input values made a non-entity out of an element… It’s a no-go. But by running in sandbox you can open 6 instances of Dynamo concurrently, set the inputs on each, and get the results back without issue. This also scales to any other tool with a Dynamo tie in (FormIt, Alias, Civil 3D, Advance Steel, etc…) once you install the sandbox entry point.

SO since this requires thinking outside of the usual Revit context, let’s discuss how that applies to your project.

We’ll start with your first screenshot - you build a Dynamo rectangle, then use that to make a floor, and pulled the area from the floor. That area appears to be an output node (assuming that is what the pink group it shoots off to in the larger screenshot). Why not take the area of the rectangle (Surface.ByPatch) and use that as the output? All the nodes used to generate the floor can then be removed from the evaluation loop needed by Generative Design.

Next up you take the same rectangle’s curves to make the exterior walls, running them from level 1 to level 2. These appear to pull the area as an output. Why not extrude those initial curves by the delta between the level elevations, and pull the area there? The walls are now out of the loop.

Same for the roof (although the means of constructing that may be a bit harder. Further, windows as shapes can be cut in to both the walls and roof surface if desired. Thermal performance can also be ‘removed from the loop’ by pulling the type property and packing that into a Data.Remember node. You can actually do that for all walls, or just build a dictionary of sorts for each wall and leverage that as a variable for the study; when it comes time to make the walls in Revit select by the name pulled from the dictionary instead of via the drop down.

All doable, but the mindset has to change. If you post your full graph the larger community can help ID more of these ways to ‘rethink’ the approach.