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.
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.
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
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.
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
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.