I made a short function that extends a line with an arc tangent to the line you selected.
The function works exactly the same as continuing a polyline only lets you select an object to start with.
Anyway, I decided to share it, so here it is:
; Extend line with a line tangent to it - dexus
(defun c:tan (/ ang obj obj-end obj-start pt select-data tanpt ~cmd *error*)
(defun *error* (msg)
(setvar "cmdecho" ~cmd)
(princ msg)
(princ)
)
(setq ~cmd (getvar "cmdecho"))
(setvar "cmdecho" 0)
(while (not select-data)
(setq select-data (entsel "\nSelect line to extend: "))
(if select-data (progn
(setq obj (vlax-ename->vla-object (car select-data))
obj-start (vlax-curve-getstartpoint obj)
obj-end (vlax-curve-getendpoint obj)
pt (trans (cadr select-data) 1 0))
(if (< (distance obj-start pt) (distance obj-end pt))
(setq tanpt obj-start
ang (angle '(0 0 0) (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj tanpt))))
(setq tanpt obj-end
ang (angle (vlax-curve-getfirstderiv obj (vlax-curve-getparamatpoint obj tanpt)) '(0 0 0)))
)
(command "_.line" "_none" (polar tanpt ang 50.0) "_none" tanpt ""
"_erase" "_l" ""
"_.pline" "_none" tanpt "_arc" pause)
) (princ "\nNothing was selected, Please select a line!"))
)
(setvar "CMDECHO" ~CMD)
(princ)
)
Hope this is useful to some of you. It was for me since I have to draw a lot of shapes that are tangent.