How to group pipes and pipe joints that have the same comment as text, and that are joined together. In the example in the image there would be 4 groups, although they have the same text comment, however they are not connected, that is why it is divided into another group
All elements of category “pipes” > Getparametervalue “comments” "List.sortbykey > Group.ByElements
I want to create groups of pipes and joints that are connected consecutively, until another pipe joint with a different comment separates it. The problem is that I have several groups with the same comment, but they are not connected consecutively.
I think you’d have to group by comment first and then step through each element’s connector set to see which elements have continuous connections. It’s not super efficient but it’s the best option I can think of off the top of my head.
Exactly, I already have the groups with all those who have the same comment, however, I cannot find which ones are continuously connected, I am trying to find the intersection, but still without result.
For example, in the image I have everyone who has the same comments, I want to find the groups that are continuously connected
As I said, the next step would be to work through the connectors to find and track connected elements. Intersections is possible, but it’s going to be way more computationally heavy than the API - I would not recommend it.
You could start from the ends (fixtures) and work back towards the start. For a singular path you would just step through each connector to the element and then the next connector along the path, tracking the comment of each element and grouping continuous elements with the same value. Branching paths is a little bit harder in that you’d have to also track where two singular paths connect. That might be a separate step.