Selecting Discontinuous Indices from List

I have a long flat list of instance parameters and I need to make a new list from that, it will be a subset of the big one.

Is there a way to return a value for several discontinuous indices of the big list, 3 and 7 and 9 for instance? The expression "parameter [3…7] in a code-block returns the range 3 through 7, see code block in attached image. Seems like I am close, but not there yet.

The new list will input into a GetParameterValueByName node so I will have values for the few parameters I am interested. If I am interested in a different set of parameters later I can input those index numbers for a new list of parameters.

Thanks for taking a look.

Daniel

I resolved the question, the solution was to get a cup of coffee and walk around the block lol… and to simplify my approach. I made a list in brackets to input into the list.get.item.at.index node. Sorting the big list alphabetically was helpful too.

Daniel

You beat me to it, but here is an illustration to what you just said:

2 Likes