The key to Dynamo (in my opinion) can be distilled down to a single concept: list management. Once you understand how to manipulate and manage lists, you can accomplish almost anything.
Even though Dynamo has a fairly good set of learning resources, it can still be a little confusing trying to understand lists, sublists, and how the various nodes can and should be used to modify lists. So here is my brief introduction to lists, and more specifically how to chop, flatten, join, combine, and transpose lists in various ways.
To start off, you have lists and sublists (lists within lists). One way to create a sublist from a list is to use the node List.Chop. Here are some different ways you can chop up a list:
In some ways, Chop is the opposite of Flatten. Flatten removes the hierarchical structure within sublists. Here are some different ways that you can flatten a list:
But sometimes you want to manipulate multiple lists by merging them together. To do this, there are a couple nodes you can use: List.Join and List.Combine. They work slightly differently and have different effects depending on the amount of sublists:
And finally, you can also rearrange combined lists using List.Transpose. This is particularly useful if you want to combine lists or sublist in order of indices (or every other element):
As you can tell, there is usually a simple way to use a node and also a more complex method. The more complex method frequently uses List.Map and allows you to modify sublists more directly.
2 thoughts on “Managing Lists in Dynamo”
Hi, this is a great post. Some of the images are missing links so that you can see them larger, could you add? thanks!
Thanks for letting me know. I’ve updated the images so you can enlarge them all now.