# LoopWhile adding Points

**URL:** <https://forum.dynamobim.com/t/loopwhile-adding-points/7127>\
**Category:** Geometry\
**Tags:** revit\
**Created:** [October 27, 2016, 7:03pm UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127 "2016-10-27T19:03:13Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![David\_Duarte](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/david_duarte/32/17571_2.png) [@David\_Duarte](https://forum.dynamobim.com/u/David_Duarte)\
**Post date:** [October 27, 2016, 7:03pm UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127/1 "2016-10-27T19:03:13Z")

</div>

Trying to add points along a line until points are outside of a bounding box.

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/9/905266d5e93412a55d5a0f7ab46ae1ae4d6fed4c.jpg)

---

<div class="post-metadata">

**Author:** ![Thomas\_Mahon](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/thomas_mahon/32/64209_2.png) [@Thomas\_Mahon](https://forum.dynamobim.com/u/Thomas_Mahon)\
**Post date:** [October 27, 2016, 7:32pm UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127/2 "2016-10-27T19:32:48Z")

</div>

It would be simpler to replicate the points then test for containement and cull all the points outside of the boundary.

---

<div class="post-metadata">

**Author:** ![Michael\_Kirschner](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/michael_kirschner/32/237_2.png) [@Michael\_Kirschner](https://forum.dynamobim.com/u/Michael_Kirschner)\
**Post date:** [October 28, 2016, 11:46pm UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127/3 "2016-10-28T23:46:54Z")

</div>

can you try just using `true` in the code block, not a string

---

<div class="post-metadata">

**Author:** ![Dimitar\_Venkov](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/dimitar_venkov/32/2068_2.png) [@Dimitar\_Venkov](https://forum.dynamobim.com/u/Dimitar_Venkov)\
**Post date:** [October 29, 2016, 3:23am UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127/4 "2016-10-29T03:23:44Z")

</div>

You’re not feeding in function objects:

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/2X/4/4da55150fe594c568ccc70ac4a719a8b9001c29c.jpg)

---

<div class="post-metadata">

**Author:** ![David\_Duarte](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/david_duarte/32/17571_2.png) [@David\_Duarte](https://forum.dynamobim.com/u/David_Duarte)\
**Post date:** [November 10, 2016, 10:55pm UTC](https://forum.dynamobim.com/t/loopwhile-adding-points/7127/5 "2016-11-10T22:55:14Z")

</div>

Thanks!
