;; | ---------------------------------------------------------------------------- ;; | PL_NewPoint ;; | ---------------------------------------------------------------------------- ;; | Function : Update a point of the POLYLINE at the specified vertex ;; | Arguments: ;; | 'ename' - The name of the POLYLINE entity ;; | 'VxNum' - Vertex Number (actual count staring with 1) ;; | 'Pt' - New value of the point to be updated. ;; | Action : Updates the vertex at the specified point with new point. ;; | Returns T if successful else returns nil ;; | Updated : March 24, 1998 ;; | Comments : Handles both POLYLINE as well as LWPOLYLINE objects. ;; | e-mail : rakesh.rao@4d-technologies.com ;; | Web : www.4d-technologies.com ;; | ---------------------------------------------------------------------------- (defun PL_NewPoint( ename VxNum Pt / More en entl mname VxCnt OS ) (setq OS (getvar "OSMODE")) (setvar "OSMODE" OS) (setq entl (entget ename) en (LI_item 0 entl) More T ) (if (= en "POLYLINE") ; Heavy Weight Polyline (progn (setq en "VERTEX" mname ename VxCnt 0 ) (while (or (= en "VERTEX") More) (setq VxCnt (1+ VxCnt) ename (entnext ename) entl (entget ename) en (LI_item 0 entl) ) (if (= en "VERTEX") (progn (if (= VxCnt VxNum) (progn (setq entl (subst (list 10 (car Pt) (cadr Pt) (caddr Pt)) (assoc 10 entl) entl ) ) (entmod entl) (setq More nil) )) )) ) (if (not More) (entupd mname)) ) (progn (setq entl (LI_RepListDXF entl VxNum 10 (list 10 (car pt) (cadr pt)))) (entmod entl) (setq More nil) )) (setvar "OSMODE" OS) (setq More (not More)) )