Hi, this could be enough to start.
I have many routines upon 'along path' subject like the one below -- I might do something more complex some time...
(vl-load-com)
(defun c:CopyAlongPolyline ( / en pl pt p1 p2 lst) ;Move Along Line
(if (and (setq en (car (entsel "\nSelect object to copy: ")))
(setq pl (car (nentsel "\nSelect path: ")))
(wcmatch (cdr (assoc 0 (entget pl))) "*LINE,ARC,CIRCLE,RAY")
(wcmatch (cdr (assoc 0 (entget pl))) "~MLINE")
(setq p1 (trans (vlax-curve-getClosestPointTo pl (cdr (assoc 10 (entget en)))) 0 1)) ; p1 ucs
(princ "\nSelect objects to define destinations (point/circles/blocks) <pick>: ")
(or (and (setq lst (ssget '((0 . "POINT,INSERT,CIRCLE"))))
(setq lst (mapcar '(lambda (e) (trans (cdr (assoc 10 (entget e))) 0 1))
(vl-remove-if 'listp (mapcar 'cadr (ssnamex lst))))))
(while (setq p2 (getpoint "\nDestination point: " p1))
(setq lst (cons (trans p2 1 0) lst)))
lst)
)
(foreach p lst
(command "_.COPY" en ""
"_none" p1 ; ucs
"_none" p
"_.MOVE" "_l" ""
"_none" (setq pt (getvar 'LASTPOINT)) ; pt ucs
"_none" (setq p2 (trans (vlax-curve-getClosestPointTo pl (trans pt 1 0)) 0 1)) ; p2 ucs
"_.ROTATE" "_l" ""
"_none" p2
"_Reference"
'(0 0 0) ; wcs
(vlax-curve-getFirstDeriv pl (vlax-curve-getParamAtPoint pl (trans p1 1 0))) ; wcs
"_Points"
'(0 0 0) ; wcs
(vlax-curve-getFirstDeriv pl (vlax-curve-getParamAtPoint pl (trans p2 1 0))) ; wcs
)))
(princ)
)