Pipes by Piping System Type

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