What is the easiest way to change the node direction of a beam?

I have a group of beams where I would like to replace node A with node B and vice versa. Now, I have to go to each beam and change each one separately. I hope there is a easier way? Thanks.