How to apply the command Flatten to a sublist

Hello everyone,

I need help to solve this problem.

I would turn my list [xi] [yi] [zi] in a list [xi] [yi].

Immagine

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Immagine1

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I tried with Flatten and List.map but I can not apply Flatten the sublist.

Do you have any advice?

Thanks in advance for the help.

Daniele

Have you tried using List.Map + Flatten as the Function of a List.Map? See Attached image

1 Like

Hi, Daniele.

I would really recommend looking into replication guides! :slight_smile: I could give you some links explaining replication guides, but the dev team have changed replication guides somewhat in the 1.0.0 release so I’m uncertain of the content’s integrity.

3 Likes

where can one find these replication guides? Thanks in advance!

Have a look here: https://github.com/DynamoDS/Dynamo/wiki/Replication-and-Replication-Guide-Part-1

Hi joisten,
what do i do wrong? my list seems to stop after 1st item.

i also have this kind of error “Warning: Method ‘Flatten’ has been deprecated, please use method ‘DSCore.List.Flatten’ instead”

this seems to be working
image

Hi @guray.batur,

I not positive but the methods shown here were the means to flatten lists before dynamo introduced ‘levels’ and the ‘amt’ port.

I’m sure the code boxes work fine, but maybe try experimenting with the Flatten node in regards to levels and amts. See example below:

The Dynamo Primer has a section on this as well:

https://primer.dynamobim.org/06_Designing-with-Lists/6-3_lists-of-lists.html

Best,

Ben

1 Like