List "reduction"

Hi everybody,
I’m looking for a method (flattening ?!?!) to convert:

  • the list elements above in the picture

in:

  • a list with single selected elements (same format of the bottom part of the picture)

Thank you in advance !
Anton

Immagine 3

You can use List.Chop to chop the single list of two elements into two lists of single elements but I’m not so sure that’s what you’re after. If you’re wanting to have an individual element, not a list, you’ll have to have a node (or code) for each element.
image

Hi @erfajo I’m trying a script who accept the “single element selection format” but I’ve a list.

Use lacing or levels.

This worked for me !

Immagine 4

That’s great but realize this only works for a static number of elements and really isn’t the best option for your case. It’s hard to tell what your exact issue is without seeing your whole graph.

1 Like

It’s very big and confused, I’ll try to make a clean screenshot :sweat_smile:

I’m studying the example here: https://forum.dynamobim.com/t/set-wall-compound-layers-function/4028/4?u=fablabolbia that basically requires element types to run a Python script.
The example is referred to walls.
By means of the following script I create several family types duplicates (using an existing wall type as starter element).
Immagine 7
The output (highlighted in red) is the previously mentioned list that I have to “convert” to a sequence of single elements types.
The method of @Nick_Boyts works !
Thank you again !
Anton

hi @erfajo thank you very much !
yes I do not need to split the list… it’s a dummy way to solve my problem because I’m not able to modify the python script :sweat_smile::sweat_smile::sweat_smile:

As you can see in the post about the walls just one wall is accepted by the script , so I have to modify the code block but it’s too difficult for me…so I’m splitting the list…