# Create Number Sequence with different start

**URL:** <https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501>\
**Category:** Lists-Logic\
**Created:** [April 30, 2018, 2:47pm UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501 "2018-04-30T14:47:54Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Martin\_Romby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/martin_romby/32/10818_2.png) [@Martin\_Romby](https://forum.dynamobim.com/u/Martin_Romby)\
**Post date:** [April 30, 2018, 2:47pm UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/1 "2018-04-30T14:47:55Z")

</div>

Hi’ all,

I’m trying to create a number sequence which would have different start based on the list length in a list.  
The number sequence should start with 100, 200 or 300 based on the length of the sublists in the count list.

 ![SequenceWithDifferentStart](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/8/9/895ef6dd89799f67c267e652e32a1e91bdcbbf8b.jpg)

So in this case what I’m trying to do is

[0] List  
.[0,0] List  
…[0,0,0] 100  
…  
…[0,0,9] 109  
.[0,1] List  
…[0,1,0] 200  
…  
…[0,1,28] 228  
[1] List  
.[1,0] List  
…[1,0,0] 100  
…  
…[1,0,4] 104

…

I know it’s a matter of lacing by I havn’t been able to crack it yet.  
Thanks.

/Martin

---

<div class="post-metadata">

**Author:** ![Daniel\_Hurtubise](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/daniel_hurtubise/32/146534_2.png) [@Daniel\_Hurtubise](https://forum.dynamobim.com/u/Daniel_Hurtubise)\
**Post date:** [April 30, 2018, 2:59pm UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/2 "2018-04-30T14:59:08Z")

</div>

How’s that

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

//If the value is smaller or equal to 10 use 100  
x\<= 10? 100:  
//Then if the value is smaller or equal to 200 use 200 if not then use 300  
x\<= 200 ? 200 : 300;

---

<div class="post-metadata">

**Author:** ![Nick\_Boyts](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/nick_boyts/32/76313_2.png) [@Nick\_Boyts](https://forum.dynamobim.com/u/Nick_Boyts)\
**Post date:** [April 30, 2018, 4:51pm UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/3 "2018-04-30T16:51:17Z")

</div>

@Daniel_Hurtubise’s method is likely the solution you’re looking for. But we need additional information to know what conditions you’re looking at.

---

<div class="post-metadata">

**Author:** ![Martin\_Romby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/martin_romby/32/10818_2.png) [@Martin\_Romby](https://forum.dynamobim.com/u/Martin_Romby)\
**Post date:** [May 1, 2018, 7:03am UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/5 "2018-05-01T07:03:04Z")

</div>

Hi @Daniel_Hurtubise, @Nick_Boyts and @erfajo  
Sorry I wasn’t being clear enough about the solution I was trying to achieve.  
I came up with a very simple solution yesterday, where I just used List.OfRepeatedItem to make the list lengths match and then it’s working.

 ![Solution](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/0/d/0db64362990d5eff58aac7769ba5855eecc9b150.png)  
See attached .dyn.

@erfajo Yes, long time no see. The solution is for identifying CCS types. [CCS.ElementType.dyn](https://forum.dynamobim.com/uploads/short-url/tRdtEwKqEFGHsVh3DYM5aCmbpq5.dyn) (20.3 KB)

---

<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:** [May 1, 2018, 7:06am UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/6 "2018-05-01T07:06:29Z")

</div>

@Martin_Romby Was your original post trying to do something like this?..

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

---

<div class="post-metadata">

**Author:** ![Martin\_Romby](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/martin_romby/32/10818_2.png) [@Martin\_Romby](https://forum.dynamobim.com/u/Martin_Romby)\
**Post date:** [May 1, 2018, 7:14am UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/7 "2018-05-01T07:14:38Z")

</div>

Yes @Vikram_Subbaiah. That was exactly what I was after. 👌  
Thank you! I have to learn more about code blocks and design script.

---

<div class="post-metadata">

**Author:** ![Karthik\_Ramalingam](https://avatars.discourse-cdn.com/v4/letter/k/edb3f5/32.png) [@Karthik\_Ramalingam](https://forum.dynamobim.com/u/Karthik_Ramalingam)\
**Post date:** [May 20, 2018, 11:33am UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/9 "2018-05-20T11:33:09Z")

</div>

Hi Team,

I am looking solution for this below requirement mentioned in this link.

[https://forum.dynamobim.com/t/hvac-duct-line-number-tag-numbering-in-the-sequence/22056](https://forum.dynamobim.com/t/hvac-duct-line-number-tag-numbering-in-the-sequence/22056)

Thanks and Regards,  
KARTHIK.R

---

<div class="post-metadata">

**Author:** ![Karthik\_Ramalingam](https://avatars.discourse-cdn.com/v4/letter/k/edb3f5/32.png) [@Karthik\_Ramalingam](https://forum.dynamobim.com/u/Karthik_Ramalingam)\
**Post date:** [May 20, 2018, 11:34am UTC](https://forum.dynamobim.com/t/create-number-sequence-with-different-start/21501/10 "2018-05-20T11:34:47Z")

</div>

> [@HVAC - Duct Line number tag numbering in the sequence](https://forum.dynamobim.com/t/hvac-duct-line-number-tag-numbering-in-the-sequence/22056):
>
> Hi Team, I am currently working on a Revit project. Where I got the requirement regarding there is a sequence line number tag need to be assigned for the Duct system based on the below format. I am trying to automate this sequence using the dynamo script. But I couldn’t able to succeed in that. Kindly check the attached image. And help me to create the dynamo script as per the below requirement. For eg., 2S345 - 2 stands for second floor, S stands for Supply system type and 345 is the sequence…

please help me out in the above requirement.
