Creating value list with push buttons

I would like to create list with a pushing a couple of push buttons. Is it possible to make it it with data recorder?

List of what?

actually I need push buttons for two purpose:
1, I want move a geometry on the screen with certain steps. ( for example right 8 m.)
I want to use 4 different buttons to move left right up and down.
So every push would mean movement of 8 meters.
2, I want a crate a list which can contain for different letters (A, B, C, D) which contain max charcters. And also i wnat to be able to clear the list so that the user can create a new random list with letters. (14.7 KB)

You have to use the Data Recorder, it’s the only way for data to persist between solutions without scripting or plugins. That in turn means you’re going to collect quite a lot of data over time, so it makes sense to remove those bits that do nothing. Furthermore if your recorded list is empty, then you still want your logic to work, so after you clean up you have to make sure that there’s at least a single identity transformation left.

I used four buttons with custom states (instead of normal=false and pressed=true, I used normal="{0,0,0}" and pressed="{+1,0,0}" for the pos-x button), but of course you’re free to use some other data to record and then convert into a transformation.

The Set Difference component removes all “{0,0,0}” identity transforms from the list, leaving only actual motions. The Merge component makes sure the list isn’t totally empty, and finally Mass Addition adds all transforms together. You can of course also compound actual transformations such as scaling, rotation or whatever.

1 Like

Thanks for the detailed explanation. My be there is script which resets data recorder upon starting the grasshopper file. Or for me is completely ok, if I connect it to the time and deletes the content of data recorder, after lets say a couple of hours.

The main issue is your data won’t survive a file save/open cycle. The record will only exist at runtime.
You can clear the data yourself by clicking on the [X] of the recorder.