Running Number

How can I run the running number base on Omniclass number as shown in the figure below and the second figure shows whats am looking for?

The example of what am looking

Where are your prefixes and suffixes pulled from? Specifically, what drives the prefix F1.02.015-0, and the suffix 001 on the first item in ‘what I want’ section?

Once you have that, String.Join and/or a + node would do the trick.

Following some information from @mohmedsolla which was sent in a direct message, the question is really about creating a range from 1 to X for each of the groupings of Omniclass numbers.

The answer is to use a List.GroupByKey node to group each omniclass value by… the omniclass value. The input for both the list and the key would be the output from the Element.GetParameterValueByName node. Then you’d use a List.Count node with longest lacing to count how many items are in each list. Next, you’d define a Range from 1 to the result of the List.Count node, turn the results into a string with a StringFromObject node, and use a Steing.PadLeft node to put 0s in front of the values to ensure a consistent depth of 2 or 3 or N digits. Next a + node or a String.Join node would allow you to append the count to the omniclass value.

The Dynamo Primer has many good examples of these concepts in action should you get stuck.