Sometimes you do not know the correct rotation of the object, and you need to use the same orientation of existing objects/walls: while dragging the object in the layout, you can use the A keyboard button in order to align the object to existing lines; once you have clicked A button, the object freezes and the mouse cursor changes as the Application asks you to select the line you want to align the object to.
It can be a wall, or one of the lines of existing objects. Once you have selected the align reference entity, you can keep on dragging the object in order to release it with the correct orientation.
This article is valid up to version 2018