# Create Number Sequence with different start

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.

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

How’s that

//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;

@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.

2 Likes

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.

See attached .dyn.

@erfajo Yes, long time no see. The solution is for identifying CCS types. CCS.ElementType.dyn (20.3 KB)

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

2 Likes

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

1 Like

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

Thanks and Regards,
KARTHIK.R

please help me out in the above requirement.