I’ve had a few searches and though there are plenty of topics related to this I can’t find the answer to my question.
I have a list of pipe diameters related to individual elements within my model and I would like to be able to group these into sublists so that I can count them and replace the sublist with a string showing the count by the first sublist item, and then i’d like to concatenate those outcomes so I have one list item per element related list.
Below is an image of the list I have and what I want to achieve;
The list structure needs to remain the same as I need to write the outcome back to a parameter within the element, so it needs to match the list structure of the element.
I’m just struggling to to group common items within a list into a sublist. If I can achieve that i can then count the items in the sublist and add that to the front of a string using the first item in the list and then only keep that first item. Then concatenate the list items again to get to my final step.
Any help or suggestions would be much appreciated.