Grouping all the elements by network in a list


Good day… I just have a question. I understand in the photo below that, this graph gets all the elements that are connected to the selected element in a network.

My question is, is it possible to do the same routine to all the elements of a category in the document? And then make a list of all the groups and all the elements within each group?

Sorry for asking, I am really stuck on how to do this. I am just new to dynamo.

Thanks in advance. ^^

It’s a good way to start.

1 Like

Hi @Durmus_Cesur ,

Thank you for the idea. I will look into it.

I am also thinking of the workflow below.

  1. Get all Elements of a category.
  2. Get the first item from the list in 1).
  3. Collect all the elements connected to the element in 2) to a list.
  4. Intersect Difference the list from 2) to the list in 1)
  5. Get the first item in the resulting list of 4) and repeat the routine from 3) to 5)
  6. This goes on until list in 1) element count is zero.

I am trying to figure how to do this now if possible ^^

If you’re getting system elements that actually track the network or system they’re in, it would be much easier (though maybe harder on your CPU) to just

  1. get all connected elements of a category
  2. flatten the list of elements
  3. get the network identifier value
  4. group elements by key (value)
1 Like

bro @Nick_Boyts , Thank you for the good idea. Your recommendation have lesser number of steps, though I am not yet aware of the Network Identifier Value yet. ^^ I will surely look into it.

What type of elements are you looking at?

Actually I am to process Duct and Pipe Networks…

Those you should be able to group by System Name.

Hi @Nick_Boyts , thank you for the suggestion. My problem is, if the modelers a putting elements into wrong System Names. I wonder if there is an element parameter who is dependent only to element connection information of the connectors.

System Names are automatic and can’t be modified (by normal means.) If someone assigned the wrong System Type all together that could cause some confusion but it still shouldn’t overwrite the original System Name.