Flatten Array Node

I am not able to get in my Library Flatten Array Node i get Flatten List. How do i get this node?

 

New Picture (2)

There should be two types of Flatten node that come up: ‘Flatten’, and ‘List.Flatten’. The List variant will ask you for a number of flatten ‘levels’, the simple one will Flatten all.

i.e Look below.

Flatten and List.Flatten

Thanks Sol,

But i don’t have Flatten Array. Every where i have list not only in flatten. Actually need to write room schedule to excel below is the script. what should i use instead flatten array?

 

Definition

 

 

Below is the snap of flatten nodes which i have in my library may be i am missing any package?

Untitled

Does your definition fail? If your definition is working then I assume they simply changed the wording to ‘list’ from ‘array’. I’m using 0.7 release at work and your using 0.8. Our IT team should be giving us 0.8 release today (So behind the times haha)

Kulkul,

Please check if it fails as Sol is suggesting.

Like I said in a previous post, List and Array are very similar. If you are coming from a programming background like VB then they are very similar yet not the same and using either one would be a conscious decision - I can see why you would be asking so ferociously for Array.Flatten. I am guessing that since you are attempting to write to Excel you are assuming it will only work properly with 2D Arrays, but in Dynamo a nested list and 2d array are quite interchangeable. That holds true to a certain degree because under the hood Dynamo is operating on Arrays while visually on the outside the UX team decided to call it all Lists. I guess a list is a more user friendly name for it. I have no idea why they are calling it that. I don’t mind it though. Whatever works for everyone.

Good luck!

Hey can you please repost this picture, its blurry

@rklughjr that picture is from 2015, so a long time ago! Dynamo has changed quite a bit since. What in particular are you looking for?

I have a script with a couple of specific groups I want to array, so im just searching up anything with array on it to help me solve my issue.

1 Like

@rklughjr would you be able to put a screenshot in here (Zoomed in so we can see detail) of where you are right now, and what you are trying to achieve? It’s easier for us to help that way :slight_smile:

Otherwise, the spirit of the image I posted above is as follows:

If you want i give better explanation of what im trying to create. Its on my topic post if you want to take a look at it.

@rklughjr ,

i discoverd this accidently… “flatten” is done by a double for loop… :wink:

KR

Andreas

Only if you have exactly two list levels. You need one nested loop for each dimension of list structure. You’re just stepping through each level until you’re at the bottom and then only dealing with items within the structure.

Flattening an n-dimensional list in python is a bit more involved than Dynamo unfortunately.

3 Likes

8 year old zombie topic - if there is a question or something which needs more detailed review let’s move it to a new topic.

Thanks - your friendly neighborhood moderator guy. :slight_smile:

1 Like