# List with different spacings

**URL:** <https://forum.dynamobim.com/t/list-with-different-spacings/10765>\
**Category:** Lists-Logic\
**Tags:** dynamo\
**Created:** [April 2, 2017, 10:54pm UTC](https://forum.dynamobim.com/t/list-with-different-spacings/10765 "2017-04-02T22:54:04Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Batman86](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@Batman86](https://forum.dynamobim.com/u/Batman86)\
**Post date:** [April 2, 2017, 10:54pm UTC](https://forum.dynamobim.com/t/list-with-different-spacings/10765/1 "2017-04-02T22:54:04Z")

</div>

Hi All

what I am trying to do;

- Extract all the doors in a project (complete)
- get the door widths (complete)
- Insert them in a wall (complete)
- The doors to be spaced 1000mm from opening to opening. (this is difficult)

I cant seem to find a way to space the door 1000mm apart?  
I have tried using the Sequence.RangeDivison node with not luck. it does divide them but it break each space into another index.

I have also tried a code block as well and i get a similar result… does anyone have some ideas?  
 ![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/f/7/f7e7d9247429753fe6605edb3b3a703dda30631f.png)

see math i am trying to do in dynamo (you can do this easily in excel but i want to do it in dynamo)

Door900+Spacing1000= **1900**  
1900+Door940+Spacing1000= **3840**  
3840+Door980+Spacing1000= **5820**  
5820+Door1020+Spacing1000= **7840**

---

<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:** [April 3, 2017, 1:43am UTC](https://forum.dynamobim.com/t/list-with-different-spacings/10765/2 "2017-04-03T01:43:30Z")

</div>

![](https://cdck-file-uploads-us1.s3.dualstack.us-west-2.amazonaws.com/flex022/uploads/dynamobim/original/3X/6/e/6efbe26914a2cea62bbfddd266f5ee38a261ca53.png)

---

<div class="post-metadata">

**Author:** ![Batman86](https://avatars.discourse-cdn.com/v4/letter/b/858c86/32.png) [@Batman86](https://forum.dynamobim.com/u/Batman86)\
**Post date:** [April 3, 2017, 1:55am UTC](https://forum.dynamobim.com/t/list-with-different-spacings/10765/3 "2017-04-03T01:55:29Z")

</div>

sweet thanks Vikram

---

<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:** [April 3, 2017, 2:02am UTC](https://forum.dynamobim.com/t/list-with-different-spacings/10765/4 "2017-04-03T02:02:41Z")

</div>

@Batman86 Another possible way

 ![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/5/3/53bc6a74a6f3baad0a6e8cf512f6b96fcfdbe2b7.png)

```
count = 4;
spacing = 1000;
widths = 900..#count..40;
lst1 = Math.Sum(List.TakeItems(widths,1..count));
lst2 = lst1 + (spacing..#count..spacing);
```
