Pipes by Piping System Type

Guys,

Total noobie here and would appreciate any help or direction.

I have number of pipes, all drawn on different system types ie. Hot Water and Cold Water.

I need to isolate the pipes on by the piping system type so I can apply different parameters to each system. I’ve searched the forum but can’t seem to find what I am after.

Below is what I would like to end up with in a list:

Hot Water
Pipe
Pipe
Pipe
Etc.

I need to always get the pipes of a particular systems regardless of the position in the list as I need to use this graph on multiple project files that may contain different systems.

Again, thanks for any help you can offer.

Hi @hargreaves102

You have 2 queries here?

Get all the elements of category pipes → Connect to GetParameterByname with name of Parameter System Types → Use List.GroupByKey node with list of your pipes and key with Output of SystemTypes. That will group your pipes with system types.

  • After you group your pipes with system types use Element.GetLocation that will return lines as output.
  • Use Line.Direction node to get the direction of pipes.
  • Connect Vector.Normalized Vector.Normalized gives us the corresponding unit vectors and enables comparison. The origin of all normalized vectors is the origin and magnitude is 1.
  • Extract x,y,z values from vector by using Vector.X,Y,Z node
  • Use Math.Round node to get round values from Vector.X,Y,Z.
  • Use Vector.ByCoordinates and connect all the Math.Round values of X,Y,Z.
  • Finally use List.GroupByKey to group your pipes by direction.

Hope that makes sense!
Good Luck!

1 Like

Thanks Kukul, i’ll Give it a whirl and let you know how I get on!

Much appreciated!

Here you go
GroupBySystemType.dyn (5.4 KB)

1 Like

Guys, thanks for all your help.

This works great but if possible, I would like to get the piping system type as per the attached images. Do you know if this is possible?

Thanks again.


The above is what I am ideally trying to achieve, alternatively, is it possible to group items containing ie. BCWS as per the image below.

I’m sorry to be a pain and really do appreciate your help.

Thanks,

Paul

Be carefull with uppercase :slight_smile:
‘System name’ != ‘System Name’

string contains in pair with filterbyboolmask should help you

Thanks Tomasz, I’ll give that a go and let you know how I get on.

Tomasz,

Still suffering! Could you point me in the right direction please

Cheers

Edited for clarity.

Show me the nodes feeding into the Element.GetParameterValueByName node, as you’re 90% of the way there but I need the prior step to show you the next step

Here’s what I got!

Thanks for helping!

Pipes by System.dyn (8.1 KB)

Here’s the graph!

You aren’t feeding a string to the string.contains node - try to be sure all inputs for string nodes are wired in before attempting a run, otherwise you will get a function or a null like 90% of the time. You are also not filtering the list of elements but the list of parameter values, which I assume isn’t your intent.

Try this:

Thanks Jacob but its still grabbing all 200 pipes and should be filtering down to about 80 BCWS pipes. See below:

Cheers

Try placing a “string from object” node between the “Get parameter value by name” node and the “string contains” node.

Thanks but still no luck. Still listing all 200 pipes

I would also check your list leveling on your “filter by Boolean” node.

Tried a number of combinations again with no joy

I think I’m there, made the modification as shown below, removed the link from the code block shown in red and added one from the var. parameter of the GetParameterValueByName (Green) and its now created 2 lists. One with filtered elements and one with All other elements

Thank you everyone for your help and support. It’s most appreciated.

This is what the final graph looks like for others who are trying to achieve this.

Thanks again!

Update:

This works but returns a list of strings. What Jacob suggested worked out spot on returning a list of pipes and just needed to be filtered by level in the List.FilterByBoolMask.

Again thanks all.

Final working graph below for those interested.

1 Like