Scrolling through a list


#1

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.


#2

Hi Dan,

I create a simple file just to show you something.

Tell if you have any question.

I create a kind of summation (\sum)


#3

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


#4

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

http://dynamobim.org/forums/topic/changing-line-weight/


#5

Dynamo > Help > Samples > Core > CoreCodeBlocks and CoreListLacing


#6

Seems like you haven’t yet been introduced to lacing

Note the lacing on the Intersect node