Arrange Pipe Fittings

Hello, i’m trying to figure way to select all pipes in my project, and change de pipe fittings direction to the lower elevation between two pipes. Is there any recomendations or steps to start?

thx.