Aby nie wystraszyć powiem ze to tylko kilka linijek tekstu:
(defun c:dp ()
(vl-load-com)
(if (and (progn (prompt "\n Select Polyline :")
(setq e (ssget "_+.:s" '((0 . "*POLYLINE"))))
)
(setq p (getpoint "\n Specify point on the previous selected polyline :"))
)
(print (vlax-curve-getdistatpoint (ssname e 0) (vlax-curve-getclosestpointto (ssname e 0) p)))
)
(print)
);KONIEC