Your screenshot isn’t legible. Zoom in to one group of nodes and use the image export.
(Your screenshot will include everything including the nodes that are not on the screen.)
Which version of Revit do you use ?
There have been changes in the API between the different versions of Revit.
I uploaded a new picture of the script and rearranged it a little bit.
I use an English version of Revit 2020. I hope this helps…
So I was thinking of maybe write a script to only tag the longest part in that particular section by diameter and offset. But that is not possible if there is only one length in that section I guess.
I’m also looking for the “lines” dynamo refers to in the watch-node
I always find it best to work on your graph in parts, rather than trying to accomplish the whole thing at once. Getting your tags correct will be much easier if you have your elements filtered first.
I would now group your pipes by System Name and Section. Section should split them up by branch and/or size for you. Then you can determine which pipe from each section you want to tag (longest, first, middle, etc.)
Once you have a pipe from each section you just need the midpoint to tag it.
Sorry @Nick_Boyts for this delay but I put this project away for a while…
So I tried this nodes you suggested wich creates a set of lists within a group (or several groups…)
So I have some more questions for that matter:
How can I filter/extract the wanted lists (sections) from that group?
How can I tag the filtered elements from this list/group?
GroupByKey only groups elements into lists. It doesn’t create Revit Groups. However, you need to use no list levels on the first GroupByKey and @L2 on the second. Once you have your lists of elements by section you can take one element from each sublist and tag it. Be sure you’re grabbing pipe though, it looks like you may have some fittings or accessories in your list that don’t have location curves.