Rename Pressure Pipes based on Reference Alignment

I am trying to rename pressure pipes networks as such (reference alignment name) - (1,2,3,…)

The issue I run into is filtering the pipes/fittings by the reference alignment naming them accordingly, then looping back through for the next reference alignment.

Any help would be greatly appreciated.

1 Like

What I use to do is to get all the indices of each unique item on the list (the reference alignments list in this case), then get the items split by lits (using List.GetItemAtIndex) and then create the names using a range that starts on a number and goes up to that number plus the size of each unique item indices list (using list.count @2).

To avoid duplicate names in the file I generally try to get the greatest number of each case that already exists on the file and start from there, but that’s completely up to you.

Another option is to use Python or code blocks to run for loops and store temporary info.