Create sublists by same name

Hey ! I have a list of walls sorted by wall names and i want to create a new list for each walltype. So is there a way to get all the identical objects out of a list an transfer it to a new one. i don’t want to filter by a name because they are changing a lot and i don’t want to add additional codeblocks to the script.

I really new to Dynamo, so thank you for your help


Welcome to the forum.

You can sort or group your elements with this nodes:

Thanks that was really helpful in the first place. Is there way to create multiple list outputs then ? So in my case i have 5 groups so i want to have 5 separate lists from this node ? without using get the item at an index number


I don’t know what you mean, you have 5 lists in youre watch node right?

1 Like

Screenshot 2021-11-01 200911

1 Like

I think this is what you are trying to do, yes?

Deconstruct will break a list into two parts. Keep doing that and you’ll have your separate lists. Unfortunately, you probably don’t know if you will have 5 items or 20 items. So this isn’t to robust. And I’m not sure you really need them all separate downstream (or really want them separate). Hard to say.

So you would need a function - but even that will give you separate outputs that need to be mapped to nodes or a list of lists (which you already have).


I think I know what he wants, I think he wants a node with 5 outputs in this case. if there are 6 keys then he wants 6 outputs. As far as I know this is not possible right?

1 Like

Hi Aaron…great way :wink:

Note the issue here is you need to know how many outputs you are dealing with. If there are always 5 - then you are good. But what if there are 100? You could make a code block that outputs 100, and then deal with the nulls if there are only 5. But that’s a lot of overhead.

I’m guessing there is a better way without separating the list of lists. What are you pplanning on eventually doing with these separate lists?

There is no way to create multiple outputs like you want from a single node (without knowing how many you need ahead of time). However, it’s actually better to learn how to handle your sublists individually than to try splitting your sublists into separate lists.

1 Like