Not exactly sure what you are asking for?
This code reverses the direction of the LWpoly line and keeps the same starting point.
Most routines I saw use the end point as the new starting point.
If this is not what you are looking for , please be more specific.
Are you drawing a new polylines?
Are you splitting an existing pline?
...Is the pline closed?
...If not closed are you creating two new plines?
Is the pline old style or light weight pline?
;;; Polyline Reverse
;;; lwr.lsp by Charles Alan Butler
;;; Copyright 2004
;;; by Precision Drafting & Design All Rights Reserved.
;;; Contact at ab2draft@TampaBay.rr.com
;;;
;;; Version Alpha March 20,2004
;;;
;;; Reverse the vertex order of a light weight polyline
;;; Keeps the same starting point unlike most reverse routines
;;;
;;; THIS SOFTWARE IS PROVIDED "AS IS" WITHOUT EXPRESS OR IMPLIED
;;; WARRANTY. ALL IMPLIED WARRANTIES OF FITNESS FOR ANY PARTICULAR
;;; PURPOSE AND OF MERCHANTABILITY ARE HEREBY DISCLAIMED.
;;; ;
;;; You are hereby granted permission to use, copy and modify this ;
;;; software without charge, provided you do so exclusively for ;
;;; your own use or for use by others in your organization in the ;
;;; performance of their normal duties, and provided further that ;
;;; the above copyright notice appears in all copies and both that ;
;;; copyright notice and the limited warranty and restricted rights ;
;;; notice below appear in all supporting documentation. ;
;;;
(defun c:plr (/ elst vlst newlst new-vlst code42 code210
obj nam pair )
(command "_.undo" "_be")
(while (null (setq en1 (entsel "\nPick an object to reverse: "))))
(setq nam (car en1) elst (entget nam) obj (cdr (assoc 0 elst)))
(cond
((= obj "LWPOLYLINE")
(setq new-vlst (list (assoc 10 elst))) ; start point
(while (setq pair (car elst))
(cond
((= (car pair) 10) ; vertex
(while (member (caar elst) '(10 40 41 42))
(setq vlst (cons (car elst) vlst) elst (cdr elst))))
((= (car pair) 210) ; extru direction??
(setq code210 pair elst (cdr elst)))
((setq newlst (cons pair newlst) elst (cdr elst)))))
(while vlst
(if (= (car (setq pair (car vlst))) 42) ; bulge
(setq code42 (cons 42 (* (cdr pair) -1)) vlst (cdr vlst)))
(if (= (car (setq pair (car vlst))) 41)
(setq vlst (cdr vlst)
new-vlst (cons (cons 40 (cdr pair)) new-vlst)
new-vlst (cons (cons 41 (cdr (car vlst))) new-vlst)
vlst (cdr vlst)))
(if code42 ; add bulge back to list
(setq new-vlst (cons code42 new-vlst) code42 nil))
(if (= (car (setq pair (car vlst))) 10)
(setq new-vlst (cons pair new-vlst) vlst (cdr vlst))))
(setq new-vlst (cdr new-vlst)) ; remove the start pt
(setq newlst (append new-vlst newlst))
(if code210 (setq newlst (append (list code210) newlst)))
(entmod (reverse newlst))
(entupd nam) ; Regenerates the polyline entity
)
((= obj "POLYLINE")
(prompt "\nNot yet working... Old Style Polyline."))
((prompt "\nObject selected is not a polyline"))) ; end cond stmt
(princ)
) ; end defun