Normally in AutoCAD you can only draw two types of straight lines, one is vertical line, the other is horizontal line, provided you’re working on ortho on mode. However you can always draw a straight angular line by turning your cursor to ortho off mode. But inspite of this, you cannot specify the exact angle of the line you’re going to draw.
So the easiest way in drawing a straight angular line with specific angle is by using another AutoCAD command, and one command I know that can be useful to perform this certain task is the SNAPANG command. SNAPANG is an AutoCAD command that sets the snap and grid rotation angle for the current viewport relative to the current UCS at your own specifc angle.
At the command prompt, just type, SNAPANG, then enter. Then enter the new value (e.g. 45). the current UCS will turn to 45 degrees. You can always get you cursor to the original rotation by entering 0 angle to your new value of SNAPANG.
Thats all for now.