Scrolling through a list

I have a list and i want to proform an operation on every item on a list. Using the API I would use a while loop and place the operation inside the while loop.

I can use a code block to pull out 1 item or a list.GetItemAtIndex node but I want to go through evey item in the list and proform a funtion of code.

Hi Dan,

I create a simple file just to show you something.

Tell if you have any question.

I create a kind of summation (



Thanks Paulo for your excellent feedback. . I didn’t realise you could write funtions and while loops. Is that the only way to itterate through an array. What I’m trying to do is get all the intersections between a wall and ducting running through it. The intersection nodes don’t take arrays

Take a look at Dimitar 's post in this forum. It may solve your problem without coding.

Dynamo > Help > Samples > Core > CoreCodeBlocks and CoreListLacing

Seems like you haven’t yet been introduced to lacing

Note the lacing on the Intersect node