Get Fixture Units of pipes of a single System Type

I’m trying to build something that will do automatic pipe sizing, but all of the examples I can find size ALL the pipes on one standard (or only do it for one type at all), and I want something that can do it by system (as in all sanitary pipes are sized one way, all vent pipes another).

Here’s a rough sketch of what I’m working on, the basic idea of it is to pick a system (P-SAN), get all of the pipes in that system, and then do the sizing, but obviously I can’t pick all of the sanitary pipes with the AND boolian

All Elements of Family Type expects a FamilyType input, not just a string name, and And expects booleans. Instead, get the system name (or type) from the pipe elements and then filter them with something like FilterByBoolMask.

Thank you