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 @Martin_Romby, long time no see :slight_smile:

It is a kind of blurry what you want to achieve… I agree with @Nick_Boyts, we need more information. Please also provide the .dyn graph with your work so far, so we dont need to invent the wheel to help you :slight_smile:

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

1 Like

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

1 Like

I had an idea that it was the classification you asked for… so here goes my graph for the same, it might inspire you :wink:

It sets also the “instance” class code, and as you can see, it includes all kinds of elements (categories)

Remember that setting the number range is not “allowed” strictly according to CCS. However, I do understand why you want to tweak the regulations a bit…

1_Type-Instance.dyn (58.7 KB) -> dynamo 1.3.x version

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.

@Karthik_Ramalingam
It is not good practice to connect to other topics in the way you have done. Please link in your topic to this one if you feel they somehow are connected including why you think they have similarities.