Thanks Se7en for the news group link in the routine.
My search turned up another one.
Haven't tried eather.
; function to reverse the order of vertex points on a polyline
; ie, to change the order from clockwise to counter clockwise
; or vise versa.
;revpoly.lsp
(defun revpoly (/ poly1 polyorg polynm poly2 poly3 poly5)
(setq poly1 (entget (car (entsel "\nPick polyline to reverse: ")))
polyorg (cdr (car poly1))
); end setq
(while (/= (cdr (assoc 0 poly1)) "SEQEND")
(setq polynm (cdr (car poly1))
poly2 (append poly2 (list
(list
(assoc 0 poly1)
(assoc 8 poly1)
(assoc 10 poly1)
); end list
); end list
); end append
poly1 (entget (entnext polynm))
); end setq
); end while
(setq poly3 (reverse (cdr poly2))
poly5 (car (reverse (cdr poly2)))
poly1 (append (list (car poly2)) poly3 (list poly5) (list '((0 . "SEQEND"))))
); end setq
(command "erase" polyorg "")
(foreach a poly1
; (print a)
(entmake a)
); end foreach
); end defun