Saludos @C_Wauw
Pruebe este código, para comenzar...
(defun c:mblk (/ sb nl sc i sn sv p pc pr a)
(princ "\nSelect Blocks and curve to move: ")
(setq sb (car (entsel "Select Block Base...:"))
nl (cdr (assoc 8 (entget sb)))
sc (car (entsel "\nSelect Curve to Move Blocks: "))
)
(princ "\nSelect Blocks to move...:")
(setq
sn (vl-remove-if
'listp
(mapcar 'cadr (ssnamex (ssget (list '(0 . "INSERT") (cons 8 nl)))))
)
)
(foreach i sn
(setq
sv (vlax-ename->vla-object i)
p (vlax-get sv 'insertionPoint)
pc (vlax-curve-getClosestPointTo (vlax-ename->vla-object sc) p)
pr (vlax-curve-getparamatpoint (vlax-ename->vla-object sc) pc)
a (angle '(0. 0. 0.)
(vlax-curve-getfirstderiv (vlax-ename->vla-object sc) pr)
)
)
(vla-move sv (vlax-3d-point p) (vlax-3d-point pc))
(vla-put-rotation sv a)
)
)
Carlos Calderon G

>Did you find this post helpful? Feel free to Like this post.
Did your question get successfully answered? Then click on the ACCEPT SOLUTION button.