This is an old Revit macro I've created to align pipes to the bottom (BOP or BOI).
It asks for a pipe to be used as reference and the pipes to be aligned.
You need to create a new macro and paste the code below replacing all the content of the file. After this you will se a module named Align_Pipe