Storing data as a new branch in a data tree, data is generated by iterations (controlled by a slider)

Is anyone familiar on how to store data within gh? I have a definition that will generate many values in a certain data tree; after every iteration (controlled by a slider) I need to add a new branch of the same data structure to the generic data.

-the recording component is losing the data tree. it is just adding elements in the end of the list.
-data output/input component saves the last value, but I need all cases.

I prepared a short gh definition (using sticky variables) to clarify what I need,and would be very thankful if someone could assist.

cheers,
D

StickyVariablesTest.gh (10.9 KB)

If you set the branch path before putting it into the recorder, it will remember it. Here’s an approach with Graft By Data from Tree Frog:


record-with-branches.gh (5.7 KB)

That’s super helpful Andrew. Thank you.
The only problem now it that in my case I will have at least 3 sliders used in a colibri iterator.
Example: I know that in total we have 48 iterations but I dont get this number as output from the component,
but I dont get it an iterative process from 0 to 48, after each update.

Do you have any suggestion for that?

I don’t know how the collibri iterator works and I was unable to open your definition because I was missing a few of the plugins you used. Assuming what you want is to try all possible combinations of a set of sliders, you can do this without any plugins using the Cross Reference component, and in this way you’ll have access to the iteration count:


record-with-branches.gh (11.3 KB)

beautiful :star_struck:
Thanks a lot
Cheers

Colibri doesn’t it contain a way to store data? did you try the newest version?

http://core.thorntontomasetti.com/colibri-release/

Dear @andheum, sorry if I bother you.

I have a question about the GraftByData component from Human´s

I need to save a simple value list, but I encountered this error: the index was out of range, it must not be negative and smaller than the collection.
If I recreate the list in a panel then it works. How do I transform the internalized list so that it is read by GraftByData?


record-with-branches(2).gh (9.5 KB)

Some advice?
Thanks and best regards

The Graft By Data component has 90 items at the data input and 10 items at the paths input.

You can use the Longest List component as shown in the examples above to get your list lengths to match.

-Kevin

2 Likes