Best way to shuffle objects in VL

Can you give me an advice how to shuffle objects in spread with VL? And maybe you can give me a clue how to use spread builder (and builders at all)

hello yar, you can shuffle elements in a spread by attaching a random number to them and then order the spread by the random number. after that get your elements back in the way you want it. the KeyValuePair or the Tuple (2 Items) can help you there:

ShuffleElementsInSpread.vl (12.7 KB)

don’t know if that fits your needs. there are also some other ways to do it…

3 Likes

@tonfilm, thanks! I used this method)
I love to see how problems can be solved in different ways with VL!

1 Like

yes, looks good as well and much less nodes. only difference is that it will give another result for each sort. the method with random spread gives reproducible results for reach seed.

@tonfilm, I use “evaluate” pin for creating random sequences in my case)

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.