How to save out or create a copy of GH components with data internalized that is generated by animating a slider?

The following workflow will generate a series of geometries and associated data when animating the slider to produce new random seed. I want to keep a copy of the results for every step.

May I ask, for each step while animating the slider:

  1. how to save the geometry and data components with the data internalized to a new GH file?
  2. or, how to make a copy of the geometry and data components within the current GH file with data internalized?

The “stream data” function and the “data output” component seem overwrite the destination file continuously, and seems we’re unable to specify a different destination file for each step of the slider animation…

how to save out components.gh (12.7 KB)

For the recording, I’d use the native “data recorder” component.

For the new file with stored data, I have 2 questions to see if Elefront is what you’re looking for or not.

1 Do you keep the rhino file open while opening the second Grasshopper definition?
2 If not, do you consider attach the previous rhino file in the new one? (worksession)

Peacock has the components to do what do you want, however there is no point in duplicating the code. If the process is not going to change, why duplicate it in different files? What you need is to have a definition/file/process in which the input and output parameters never change (this means that if you have 3 input parameters of type number in a certain order, always keep this) and also the set of the input values of the parameters for each result, so that you have the input arguments (the source values, of the slider) and a result, as pairs input-output.

In the [Recorder] component, you can list all input parameters and the result. When you have finished saving, you internalize this data package in a data parameter. When you want to use them, you know that the last value is the result and the other input arguments, and you can feed them to the definition easly.

If the native GH Save State functionality (File Bar>Solution>Save State) helps you here, you can use the [State Manager] component to automate it.

I don’t know if this can help you.
Record data and use data output than use data input in a new file

Thanks, @Dani_Abalde The Peacock tool set is very cool.

However, it is not the current value combinations of a set of components, i.e., their status, that I want to save so as to make sure I can reproduce certain outputs later, be it numerical values or geometry.

What I want to save are the data and geometry generated during an automated workflow, such as surface solar radiation simulation for 10 buildings, each may take several hours. I want to save the simulation results for each building and the geometry with the results embedded, too, so that I can use the data and geometry for other analysis outside Grasshopper later without re-running the simulation for each one when I want to retrieve the data for any one of these buildings.

Thanks, @seghierkhaled.

However, the data output component will overwrite the data continuously, if data dam is not used. When data dam is used, it will just collect all the output in one file without differentiating the result for each step of an automated process. So, I’m afraid it is not a solution to save progressively generated output separately.

When you record data new values added to the list, try to find list length and use list partition
than plug the different output to data output

That’s what I told you, the source of your process, all the values that feed the input parameters. The process or components are like a black box that does not need to be touched or copied.

I’ve done this many times to explore the parametric space of my designs. I compute a huge variety of source parameters and store the results in an array in the model. Then I visually examine the results and choose the most interesting ones, and I only have to look at the index of that solution (input-ouput pair) to replicate it.