Hi,
It's quite difficult to reply knowing so little...
Form a given point, there can be two, one or none tangent to an arc.
If two are able, wich one do you want to draw ?
Here's a way using 'command':
closer to the arc start point
(command "_.line" "_non" yourPoint "_tan" (vlax-curve-getStartPoint yourArc) "")
closer to the arc end point
(command "_.line" "_non" yourPoint "_tan" (vlax-curve-getEndPoint yourArc) "")
If youy want to avoid using the 'command' function, you can use a geometric method
The tangent points from a point to a circle are the intersection points betwenn the circle and another one wich center is the middle of the line between the circle center and the point and which radius is the half of this line length (see picture).
Here's a quick and dirty (no error handler) using this method
;; TangentToArc (gile)
;; Returns the tangent points list from the given point to the arc (or circle)
;;
;; Arguments
;; arc: an arc or circle (vla-object)
;; pt: a 3d point
(defun TangentToArc (arc pt / mid tmp)
(vl-load-com)
(setq mid (mapcar '(lambda (x1 x2) (/ (+ x1 x2) 2.))
(vlax-get arc 'Center)
pt
)
tmp (vla-AddCircle
(vla-get-ModelSpace
(vla-get-ActiveDocument (vlax-get-acad-object))
)
(vlax-3d-point mid)
(distance mid pt)
)
)
(if (setq int (vlax-invoke arc 'IntersectWith tmp acExtendNone))
(setq int
(cons
(list (car int) (cadr int) (caddr int))
(if (cdddr int)
(list (list (nth 3 int) (nth 4 int) (nth 5 int)))
)
)
)
)
(vla-Delete tmp)
int
)