;| ALPO.lsp -- ALign POints
copies and aligns a set of user-selected points to locations on
a selected target object perpendicular to their original locations.
If a polyline, 3Dsolid, or other multi-segment target is selected,
the new points will be perpendicular to the segment picked, not
necessarily the nearest segment.
Points maintain Z-coordinate in current UCS regardless of Z-coordinate
of alignment target.
|;
(defun c:ALPO ( / en ed pickpoint ss n loc)
(command "._undo" "_begin")
(setq en (entsel "\nSelect alignment target (line, polyline, etc.): "))
(setq pickpoint (cadr en))
(prompt "\nSelect points to be aligned: ")
(setq ss (ssget '((0 . "POINT"))))
(if ss
(progn
(setq n 0)
(while (< n (sslength ss))
(setq en (ssname ss n))
(setq ed (entget en))
(setq loc (trans (cdr (assoc 10 ed)) 0 1))
(command "._copy" en "" loc ".xy" "per" pickpoint "@")
(setq n (1+ n))
);while
);progn
(prompt "\nNo points selected.")
)
(command "._undo" "_end")
)
(princ "ALignPOints loaded. Type ALPO to run.")
(princ)
I have this lisp which help move points prependicular on line
can some one modify this lisp so that i can move cogo points (civil3d points) in similar way
Thanks