(defun c:Rchon (/ sel ent pt )
(setq sel (entsel "Select Line/Arc/Polyline : "))
(cond (sel
(setq ent (car sel)
pt (vlax-curve-getclosestpointto ent (cadr sel))
)
(setvar 'snapang (angle '(0.0 0.0 0.0) (vlax-curve-getfirstderiv ent (vlax-curve-getparamatpoint ent pt))))
)
(t (setvar 'snapang 0.0))
);end_cond
(princ)
)
Will set the snapang to the angle at the closest point of the picked object (Arc, Circle, Ellipse, Line, Polyline, Ray, Spline, Xline). Won't work with Mlines.
Select an empty part of the screen to reset.