# Iterate through the dynamo graph

**URL:** <https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602>\
**Category:** Lists-Logic\
**Tags:** loop\
**Created:** [September 12, 2019, 3:49pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602 "2019-09-12T15:49:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![mariaesp2019mex](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mariaesp2019mex](https://forum.dynamobim.com/u/mariaesp2019mex)\
**Post date:** [September 12, 2019, 3:49pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/1 "2019-09-12T15:49:40Z")

</div>

Hi, as of now I’m creating only 1 new family type and then modifying its parameters and with all of those new values, changing a Wall and saving it as a “.rvt” file in a path in the computer. But now, I want to go a step further and create various family types and each one with its own parameters and save each one in a “.rvt” file. For this, so far I have this:

 ![Picture1](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/8/68a9e1725605112fc74d3697052270b75968303f.png)

And the idea is that I can go through steps 1,2,3 and 4 and then start again like the blue arrow shows by moving to the next element of the list of each one of the lists near the yellow circles. But my problem is in the yellow circles, and that problem is that I don’t know how to move to the next element of the list ( **iterate through the list** ), I don’t know how to get the next **index** of the list.

I tried to iterate through the list using the while loop that its crossed in red but obviously it didn’t work. So, if anyone has any idea of how to solve this I would appreciate it a lot! Thanks!!!

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [September 12, 2019, 4:50pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/2 "2019-09-12T16:50:10Z")

</div>

Make your flow into a custom node and use elements as input 😁

---

<div class="post-metadata">

**Author:** ![mariaesp2019mex](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mariaesp2019mex](https://forum.dynamobim.com/u/mariaesp2019mex)\
**Post date:** [September 17, 2019, 1:14pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/3 "2019-09-17T13:14:12Z")

</div>

Hi Jonathan, I didn’t know that I could do that and that was very helpful for cleaning out a bit the workspace, so thanks a lot!  
But still I haven’t manage to solve the issue, because I still don’t know how to input properly the elements into the Custom Node. So far I have this:  
 ![Capture3](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/6/0/60618d9632d570c35408f13ca618ca50cac81344.png)  
The “Create Object” node is the Custom Node, but I still don’t know how to pass it the list of lists, so if you have any other ideas I would very much appreciate them, thanks!

---

<div class="post-metadata">

**Author:** ![Jonathan.Olesen](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jonathan.olesen/32/44242_2.png) [@Jonathan.Olesen](https://forum.dynamobim.com/u/Jonathan.Olesen)\
**Post date:** [September 17, 2019, 3:10pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/4 "2019-09-17T15:10:46Z")

</div>

Hi, firstly it seems that you are creating three identical elements?

I would skip that step and enter the list output directly into your new node. secondly you should define what kind of input the node should work with. This is quite nicely explained in the dynamo primer on custom nodes. 🙂

---

<div class="post-metadata">

**Author:** ![mariaesp2019mex](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mariaesp2019mex](https://forum.dynamobim.com/u/mariaesp2019mex)\
**Post date:** [September 17, 2019, 3:18pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/5 "2019-09-17T15:18:49Z")

</div>

Yes, they are identical but just for demonstration purposes, in theory this will be data pulled out from an excel sheet so the values in the list of lists will be different for each one. And the input of the new node should be a list. And sorry but I don’t understand which step are you talking about, which step should I skip?

---

<div class="post-metadata">

**Author:** ![mariaesp2019mex](https://avatars.discourse-cdn.com/v4/letter/m/eb9ed0/32.png) [@mariaesp2019mex](https://forum.dynamobim.com/u/mariaesp2019mex)\
**Post date:** [September 18, 2019, 2:09pm UTC](https://forum.dynamobim.com/t/iterate-through-the-dynamo-graph/40602/6 "2019-09-18T14:09:49Z")

</div>

Solved the issue with the List.Map node!

 ![listMap](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/2/1/21fe7427e4c8a7d0d723dd1ac906d3dcb2db3e19.png)
