Some questions about pipe alignment

I saw someone, aligning some pipes horizontally at a specified interval. I have been thinking about how to achieve this. This problem has troubled me for a long time. Can someone help me?

Do you remember where you saw this post? What have you tried?

I tried,I can only do vertical alignment