Generative Design Development

Hi All

Wrote a generative design script that extrudes from a selected surface in Revit and generates randomized spline offsets based on the chosen boundary. It works pretty well based on the initial concept.

I have two main questions that I’d love to get clarity on:

  1. How to use generative design in the conceptual massing environment.

  • How to use external components in a Generative Design study.
  • Can generative design data be exported to PowerBi?

A more thorough explanation of the questions and how I resolved them temporarily:

QUESTION ONE
I’d like to get those mass options in Revit as functional masses. Functional mass refers to a mass that you can create floors, walls, etc from.

Generally, I’d run the script in the conceptual massing environment, but unfortunately, generative design is not available there. Will this be something you’re looking at in the future?

Is there another way to get a functional mass in Revit other than that? I tried both the ImportInstance.ByGeometry and the DirectShape.ByGeometry node both didn’t give the desired functional results.

My work around was to use the ImportInstance.ByGeometry node and then exported it to a SAT which you can bring into the conceptual massing environment, but If we want 6 options, we need to repeat the process 6 times which is manual and time-consuming.

QUESTION TWO

As part of the development, we created an adaptive family that can sweep through the transposed points and rotate either randomly or through the values of an image. This works well in the dynamo environment but because the AdaptiveComponent.ByPoints node pushes the data to Revit and is not keeping it in Dynamo, it doesn’t generate the options in the generative design interface.
Is there a way to use the adaptive family purely in dynamo and is it possible to use external families in generative design?

My workaround was to use an interim placeholder extruded and thickened spline which can be viewed in a generative design study, this can help to shortlist options. Once I have my short-listed options I need to re-input and match the generative design data in dynamo to take the design further.

Again, if I want 6 options, I need to repeat the process 6 times which is manual and time-consuming.

In the same thought can we possibly export the Generative design data to an external source like PowerBi to further analyze results?

Any guidance and insights will be greatly appreciated.

Thanks
KM

  1. Unfortunately, I believe the API still doesn’t allow for the creation of massing elements. I don’t use massing so I’m not aware of all the functionality, but is there a reason you need massing elements over floors, walls, etc.? Could you have the Dynamo graph create the appropriate elements from the beginning?

  2. Short answer, no. You can’t do anything with Revit objects in GD. Your current solution is the proper workaround, i.e. creating some kind of visualization in Dynamo to represent the object. However, if you tie the necessary values in Dynamo to their respective element parameters, types, whatever, you can automate all of that in Dynamo for Revit (outside of GD). If you run GD in the Dynamo environment instead of through Revit, you can open a selected GD solution in that instance of Dynamo. So you won’t have to make all the same changes manually. With those properties tied to Revit elements and a Gate node you can even automate their creation.

  3. All the run data from Generative Design gets logged here: %APPDATA%\GenerativeDesign. You can then do whatever you want with PowerBI.

1 Like

@LilliSmith can weigh in here, but I am fairly certain that you can drive a mass family from Dynamo. In place massing is a no-go as there is no such thing as in place API - families are more robust, practical, and reliable anyway, and can be edited after the fact. You’ll want to look into sending the component elements (the adaptative points which define the curves which define the surfaces which define the mass), and having the API generate the content from there. It’s an involved workflow, but is valuable once you learn it. I cannot share code samples directly as they were built for a client, however I can provide guidance in another thread once you start developing something.

If SAT works, you can also export out directy to SAT from Dynamo, and either manually import the files or write a graph to do the imports for you in bulk.

External links, sure - just not ones which involve the Revit API. More on this in a bit.

To work with Revit content requires a Revit instance that isn’t actively processing another command. Generative Design spins up six instances of Dynamo sandbox concurrently, and uses each of these instances to run a copy of your graph with the inputs set by Generative Design. As such, even if you could hook into Revit you wouldn’t have an idle copy which isn’t processing any data - there first Dynamo sandbox build would be tying up the subsequent ones.

But note that I did say external links are possible. Dynamo core can read in external data from a variety of sources - you acn see which these are by reviewing the content available in the Dynamo Sandbox. Excel and CSV to move numbers are well known examples of this. However you can also build your own framework for serialized data in these formats - JSON is a common means of moving such data around, including Geometry elements.

Setting up a design option, and having Dynamo place the family instance in Revit will work. However this has to happen after a Data.Gate node. You can read more about those in the Generative Design Primer here: Using Data from Revit - Generative Design Primer.

In the latest build (Revit 2023) you can actually export the results directly from inside Generative Design - no need to look into the history which nick mentioned if you get current. :slight_smile:

2 Likes

Thank you for the valuable feedback. Very clear and thorough!

Awesome. Thank you.

@kobusmGJ4VU Thank you so much for sharing your use case and problems! Thank you also to Jacob and Nick for helpful answers. I agree with all they’ve said, I will only add that we did a blog post on using PowerBI with exported generative design data here Telling a Story with Generative Design Outcomes (Part 2) - Dynamo BIM Totally hear you on wanting access to the massing API and better ways to leverage all the work you’ve don in adaptive components in generative studies. We have this on our backlog. Keep up the great work and keep in touch!

1 Like