;; | ---------------------------------------------------------------------------- ;; | PL_AddPoint ;; | ---------------------------------------------------------------------------- ;; | Function : Add a new point on the polyline just before the specified vertex ;; | number 'VxNum' ;; | Arguments: ;; | 'ename' - The name of the POLYLINE entity ;; | 'VxNum' - Vertex Number (actual count, not array) ;; | 'Pt' - New value of the point to be added. ;; | Action : Adds a vertex at the specified point along the polyline ;; | Returns : T if a vertex was added else returns nil ;; | Updated : March 24, 1998 ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun PL_AddPoint ( ename VxNum Pt / pt1 entl vlist Added OS ) (setq OS (getvar "OSMODE") Added nil vlist (PL_plist ename) ) (setvar "OSMODE" 0) (GE_Zoom2Lst vlist) (command "._Pedit" ename "_Edit") (if (> VxNum 0) (repeat (1- VxNum) (command "_Next") )) (command "_Insert" Pt) (setq Added T) (if (> VxNum 0) (command "_X" "_X") (progn (setq entl (entget ename)) (if (= (LI_item 0 entl) "LWPOLYLINE") (progn (command "_Previous") (setq pt1 (append (LI_item 10 entl) (list (LI_item 38 entl)))) ) (setq pt1 (LI_item 10 (entget (entnext ename)))) ) (command "_Move" Pt "_Next" "_Move" pt1 "_X" "_X") )) (setvar "OSMODE" OS) Added )