You are looking at a command called remap

remap
Re-shuffles objects in the map view.

Objects facing or leading in a direction (north etc..) direction will still be in that general direction.

Objects put on/in/under.. other objects will retain this relationship.
Code