Set Multiple Element Parameters to Different Values - Condense?

I’m trying to make a script to set element parameters based on the user-input “SIZE LETTER” of A, B, C, etc. I’m looking for guidance to streamline my design to do this all from a user being able to set values for parameters for each SIZE LETTER. Then any element of that letter will be set to those values.

This is what I’ve made as a working example for what I would do for E:

From here, I would copy this same thing for the other letters, and repeat, but I feel like there is a simpler way to achieve this with some coding knowledge/nodes I may not know of. I currently branch this process to filter for each letter, as when I tried filtering in succession, it started to mess up the list indexing and would end up null by the last letter.

Here is the current state:

For reference, there will be about 8 fields I need to set per letter (currently changing 2 in that example), so you can see why I’d like to try and condense as much as possible… This is mainly going to be used in editing long schedules of equipment, and will be much faster, even if you have to input 8 fields per letter vs manually doing this for 40 different families.

TLDR: How can this be condensed? Is there a way to create a dropdown in the player that will change the input parameter values but only for the dropdown (A, B, C, etc.) selected? That way it wouldn’t require nearly as many user input fields.

I actually ended up finding a great solution, however, I don’t think it can be set as input…

Look into Data-Shapes. It’s a package for building custom UI popups for Player. You can use this to create a dropdown selection. You can also use it to create inputs for the parameter values if they aren’t hardcoded. If they are, I’d recommend creating a dictionary to return the appropriate values based on selection. From there it’s just a matter of list management. Check out the Dynamo Primer for info on list levels and use them to force parameter values to each parameter for all elements (instead of using List.Combine).

1 Like