How to check Pipe slope check with respect to System type & pipe size

How can I make a condition statement so that I can check my drainage pipe slope with respect to their system type & size? My all vent pipe is at 1/8" slope and Drainage pipe upto 2" is at 1/4" slope and above 1/8" slope. I need some ideas to create this kind of condition statement.

You can either return target values based on system type and then check to see if the pipes meet those slope requirements or you can combine it all into one nested condition.

What have you tried so far?

You can use a boolmask filter

Sample collection method, with parameter types for reference.
You’ll likely need to call the parameters by name; the Element.Parameters list size changes depending on the Pipe System Type which makes indices meaningless.

I want an idea that is it is possible where I can set a certain condition for pipe slope if a certain pipes does not fall on that condition then dynamo color those pipes? If it is possible the how. Currently I’m export slope value with Pipe size System type & element at xls format then check it from excel.

This is a stripped down version of a similar script (for reference this one was intended to annotate near-horizontal pipes).

The basic steps are:

  • Compare slope to requirement
  • Address pipes where the slope is ‘null’ (perfectly vertical pipes)
  • Compare second requirement (in my case it was pipe length, in yours it could be pipe size)
  • Combine boolean masks (ex: If pipe is less than 1/8" slope && if pipe is less than 2", list is true)
  • Apply filter mask
  • Color pipe (not shown above, but you’d need to pick a view and do a color override)