# Loop Statement not working

**URL:** <https://forum.dynamobim.com/t/loop-statement-not-working/55868>\
**Category:** DesignScript\
**Created:** [October 5, 2020, 8:20pm UTC](https://forum.dynamobim.com/t/loop-statement-not-working/55868 "2020-10-05T20:20:13Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Peter.vansteeJS2FV](https://avatars.discourse-cdn.com/v4/letter/p/439d5e/32.png) [@Peter.vansteeJS2FV](https://forum.dynamobim.com/u/Peter.vansteeJS2FV)\
**Post date:** [October 8, 2020, 3:19pm UTC](https://forum.dynamobim.com/t/loop-statement-not-working/55868/4 "2020-10-08T15:19:40Z")

</div>

I worked out my issue by creating a custom node that preformed the task that I needed done and running it through a LoopWhile Node. [Just like this example.](https://forum.dynamobim.com/t/loop-with-python/11195/4)

Here is the graph I ended up creating

 ![image](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/9/8/9852fcc825cbeed286ebd5926de7fe3f969b9b28.png)

And here is the custom node I created

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

Hopfully this will be of some use to the next person to stumble across this post.

---

_[View the full topic](https://forum.dynamobim.com/t/loop-statement-not-working/55868)._
