DYNAMO: Auto numbering pipe fittings according to classification system

Hi there

I’m new to Dynamo and i’m having trouble figuring out, how I solve my problem.
I am trying to auto number my pipe fittings in a parameter called “CCSTypeID” with the prefix “%XMC”
So far i’ve figured out, how i can assign a number to all of the fittings in my project. However, there are over 6000 fittings, and I only want it to assign a number to the fittings by type and size.

This is my dynamo scripts so far:

Are there anyone, who can help with this issue? :slight_smile:

And this is the schedule, in which i want it to autonumber the types by size.

@amoBNU6F , hi

You combine String + Double, so you have to make your Count also to a string.

Hi @amoBNU6F ,

Using your list of elements, get the FamilyType, then using the node List.GroupByKey, using the familytype name as key you can group your pipes by the FamilyType.

After doing that you can do the same, but now for the size. Just make sure you are using List Level 2 such that you don’t undo the grouping of the previous step.

After that you can use the code you have now to number them.

PS: Search the forum on “grouping by X and then Y”, I’m sure you’ll be able to figure it out through those examples.

Thanks. I’ll check it out, and try to solve it. :slight_smile: