# List.GetItemAtIndex - Cycle?

**URL:** <https://forum.dynamobim.com/t/list-getitematindex-cycle/15089>\
**Category:** Revit\
**Created:** [September 25, 2017, 4:45pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089 "2017-09-25T16:45:21Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jstillplowman](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jstillplowman](https://forum.dynamobim.com/u/jstillplowman)\
**Post date:** [September 25, 2017, 4:45pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/1 "2017-09-25T16:45:21Z")

</div>

Hi,

I have a list.get item at index node, and would like this to cycle through a range, is this possible?

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 25, 2017, 4:50pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/2 "2017-09-25T16:50:33Z")

</div>

An illustration would be welcome

---

<div class="post-metadata">

**Author:** ![jstillplowman](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jstillplowman](https://forum.dynamobim.com/u/jstillplowman)\
**Post date:** [September 25, 2017, 4:58pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/4 "2017-09-25T16:58:30Z")

</div>

apologies, trying to think of a way to make it clear - here is an image.

Within the list are 141 lists, of each i want to write to Revit - thus getting the item at each index and writing. I was wondering if rather than dragging the integer value, there is a way it will “cycle” through each list.

![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/b/3/b35a00048b45a3fc6bec6b35e549b8b3a34b4f6c.png)

---

<div class="post-metadata">

**Author:** ![Yna\_Db](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/yna_db/32/30641_2.png) [@Yna\_Db](https://forum.dynamobim.com/u/Yna_Db)\
**Post date:** [September 25, 2017, 5:00pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/5 "2017-09-25T17:00:36Z")

</div>

Writting _0…141;_ in a code bloc (as the index input) should do that.  
Edit: I can’t write it correctly in the post, I don’t know why, but there are only 2 points between the numbers, see other examples here:  
[http://dynamoprimer.com/en/07\_Code-Block/7-3\_shorthand.html](http://dynamoprimer.com/en/07_Code-Block/7-3_shorthand.html)

---

<div class="post-metadata">

**Author:** ![Vikram\_Subbaiah](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/vikram_subbaiah/32/50797_2.png) [@Vikram\_Subbaiah](https://forum.dynamobim.com/u/Vikram_Subbaiah)\
**Post date:** [September 25, 2017, 5:05pm UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/7 "2017-09-25T17:05:17Z")

</div>

> [@jstillplowman](#):
>
> Within the list are 141 lists, of each i want to write to Revit - thus getting the item at each index and writing. I was wondering if rather than dragging the integer value, there is a way it will “cycle” through each list.

If you need all elements in a list, there is no need to _cycle_ through each element. Dynamo does so, by default.  
I suspect your perception of the way lists work is faulty. You most likely don’t need _GetItemAtIndex_  
Kindly share a complete graph and try to explain what you’re trying to acheive.

---

<div class="post-metadata">

**Author:** ![jstillplowman](https://avatars.discourse-cdn.com/v4/letter/j/4491bb/32.png) [@jstillplowman](https://forum.dynamobim.com/u/jstillplowman)\
**Post date:** [September 26, 2017, 7:43am UTC](https://forum.dynamobim.com/t/list-getitematindex-cycle/15089/9 "2017-09-26T07:43:39Z")

</div>

thanks, will give it ago - I guess it is the way my graph continues after at each list item is a new family being created.
