Getting started with automation / iterations of a scene

rhino6
unhandled

#1

Hi, I’d like to start running various configurations of my Grasshopper scene and producing the renders/outputs/visualizations (to file or other method) to be used for a publication. Simple example - I have a scene created in Grasshopper with some Ladybug/Honeybee daylighting analysis - If I want to adjust the sun path automatically to a few different positions and save out / capture the analsys from each of those configurations, where should I start? Doing this by hand is a little annoying for lots of configurations, and lining up the screenshots is tedious. I’d like to automate this process.

I found a few tutorials online, but because some of them are pretty old, I just wanted to check with the community first to see what is the recommended way to start learning automation with latest Grasshopper + Rhino 6.

I can use Python, C#, C++, etc. if necessary. I also wasn’t sure if there were components or a way to do this right from the Grasshopper interface these days. Since all that I have to do is a few input changes to a few components, perhaps this is achievable through Grasshopper interface itself.

Any tutorials or starting points you recommend are appreciated. Thank you very much!


#2

Take a look here

http://developer.rhino3d.com/api/grasshopper/html/d113a9f0-6e27-46df-8316-2079c44382ac.htm

// Rolf


#3

Thank you very much!

So just to clarify, with a component I create myself, can I run the solver on my entire Grasshopper scene to produce an output/render, then save that output/render to file somewhere, then run another iteration of my scene, and repeat? So if I had a list of configurations/inputs, I could iterate through them and run the solver on the graph each time to produce the output, right?

Or is creating your own Grasshopper component mainly for producing a custom computation as any one single part of the graph?

I’m looking for the recommended way of taking a Grasshopper scene an automating various versions of it and collecting the multiple results.


#4

From script components (or if you prefer writing components in Visual Studio, I do both) you can do “anything” that can be done manually with .NET, Grasshopper and RhinoCommon (“Rhino core”) commands (has most of the functionality which is accessible via menus). It’s only a question about how.

Others here on the forum knows more details about your specific use case.

// Rolf


#5

Oh ok, great!

I’m guessing I could have a script component iterate through a list of inputs (the various configurations), and for each iteration, feed the inputs out to various other components in my scene, then output the final render/result of the graph to a specifc filename, and repeat for each iteration of the input list.

I’m going to look into that approach. Thank you.