# How would I go about doing a while statement in Dynamo?

**URL:** <https://forum.dynamobim.com/t/how-would-i-go-about-doing-a-while-statement-in-dynamo/23542>\
**Category:** Revit\
**Tags:** dynamo\
**Created:** [July 9, 2018, 3:25pm UTC](https://forum.dynamobim.com/t/how-would-i-go-about-doing-a-while-statement-in-dynamo/23542 "2018-07-09T15:25:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![WARTELLAD](https://avatars.discourse-cdn.com/v4/letter/w/34f0e0/32.png) [@WARTELLAD](https://forum.dynamobim.com/u/WARTELLAD)\
**Post date:** [July 9, 2018, 3:25pm UTC](https://forum.dynamobim.com/t/how-would-i-go-about-doing-a-while-statement-in-dynamo/23542/1 "2018-07-09T15:25:31Z")

</div>

So I have a list of xyz coordinates (named l) as shown below:

![Capture](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/f/9/f99ee5648d2146a87330aa63810519b5ca38db95.PNG)

So I want to run this while statement (C++ format) in dynamo but I can’t figure out how.

Firstly, I don’t understand the whole [Imperative] thing, and even if I do, the action of placing a receptacle feels like it needs to be done using a node rather than in a code block.

Secondly, I can’t figure out how to do a while statement in Dynamo. The description it gives isn’t enough and I can’t find any help online.

Any suggestions?

![code](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/b/0bb8e700ad32450015e5623c753586ad84b5f1cc.PNG)

---

<div class="post-metadata">

**Author:** ![jacob.small](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/jacob.small/32/161030_2.png) [@jacob.small](https://forum.dynamobim.com/u/jacob.small)\
**Post date:** [July 10, 2018, 4:38am UTC](https://forum.dynamobim.com/t/how-would-i-go-about-doing-a-while-statement-in-dynamo/23542/2 "2018-07-10T04:38:07Z")

</div>

Did you look over the design script language manual (check section 12 closely):

> **[Dynamo\_language\_guide\_version\_1.pdf](https://dynamobim.org/wp-content/uploads/forum-assets/colin-mccroneautodesk-com/07/10/Dynamo_language_guide_version_1.pdf)**
>
> 1684.40 KB
