Here's a quick and dirty custom line command which changes the UCS to have the X axis on the same angle as the last line segment drawn:
Code:
;;; Draw line while changing UCS to allow relative angles
(defun c:LineRel (/ pt1 pt2 elst en ed)
(command "._undo" "_BEgin")
(command "._ucs" "_World")
(while (and
(/= pt1 "Exit")
(or (initget "Exit Undo")
(and pt2
(setq pt1 pt2
pt2 (getpoint pt1 "\nPick start point [Exit/Undo] <Exit>: ")
) ;_ end of setq
) ;_ end of and
(setq pt1 (getpoint "\nPick start point [Exit/Undo] <Exit>: "))
) ;_ end of or
) ;_ end of and
(cond
((and (= (type pt1) 'LIST) (or pt2 (setq pt2 (getpoint pt1 "\nPick next point: "))))
(command "._line" pt1 pt2 "")
(setq elst (cons (entlast) elst))
(command "._ucs" "_World")
(command "._ucs" "_Z" (angtos (angle pt1 pt2)))
(setq pt2 (trans pt2 0 1))
)
((= pt1 "Undo")
(if (setq en (cadr elst))
(progn
(setq ed (entget en)
pt2 (cdr (assoc 11 ed))
) ;_ end of setq
(setq en (car elst)
elst (cdr elst)
) ;_ end of setq
(entdel en)
(command "._ucs" "_Previous")
(command "._ucs" "_Previous")
(setq pt2 (trans pt2 0 1))
) ;_ end of progn
(if (setq en (car elst))
(progn
(entdel en)
(command "._ucs" "_Previous")
(command "._ucs" "_Previous")
(setq pt2 nil)
) ;_ end of progn
(setq pt2 nil)
) ;_ end of if
) ;_ end of if
)
) ;_ end of cond
) ;_ end of while
(command "._undo" "_End")
(princ)
) ;_ end of defun
It's not working perfectly, some tweaking needs to be done, but it gives an idea.