Pressure pipe network swap multiple fittings

Hi everyone,
I am trying to build a tool in dynamo that allows to swap multiple fittings in a pipe network.

For example, i’d like to swap all ductile iron 22.5° elbows in steel 22.5° elbows.

I’ve tried to build something but every path i’ve tried doesn’t seem to lead to anything…
Does anyone know a way to perform this operation?

Thank you
Francesco


Hi
you can follow same this in pressure.