Community
Hello everyone:
I have a problem, I need to modify a lot of points COGO and this must first export them to a .txt file, to do this create a polyline that encloses all points separating points so I should not change.
To do this modifying a lisp routine that had the problem is that when you are exporting items not save my selection but exported me all the points, I tested that the selection of points if it works, replacing the "_exportpoints" by "_move" and so move only the selected points.
any help? Here I give the code:
;;Rutina para seleccionar entidades dentro de polilinea,arco,spline (defun c:poly_sel() (prompt "\nSelecciona la Polilinea") (setq coord(pl_plist (car(entsel)))) (command "_EXPORTPOINTS" "_wp") (foreach pt coord (command pt) ) (command "" "" ) (defun PL_plist ( ename / en entl flag vlist pt Elev sa ea Rad CenPt );;función para obtener coordenas de una entidad (setq vlist '() entl (entget ename) en (LI_item 0 entl) ) (cond ((= en "LWPOLYLINE") (setq vlist '() Elev (LI_item 38 entl) ) (foreach pt entl (if (= (car pt) 10) (setq vlist (cons (list (cadr pt) (caddr pt) Elev) vlist)) ) ) (setq vlist (reverse vlist)) ) ((= en "SPLINE") (setq vlist (LI_mitem 11 entl)) (if (not vlist) (setq vlist (LI_mitem 10 entl)) (setq vlist (reverse vlist)) ) ) ((= en "POLYLINE") (setq ename (entnext ename) entl (entget ename) en (LI_item 0 entl) vlist '() ) (while (= en "VERTEX") (setq flag (LI_item 70 entl)) (if (and (zerop (logand flag 1)) (zerop (logand flag 2)) (zerop (logand flag 8)) (/= flag 128) ) (setq pt (LI_item 10 entl) vlist (cons pt vlist) ) ) (setq ename (entnext ename) entl (entget ename) en (LI_item 0 entl) ) ) (setq vlist (reverse vlist)) ) ((= en "LINE") (setq vlist (list (LI_item 10 entl) (LI_item 11 entl))) ) ((= en "ARC") (setq CenPt (LI_item 10 entl) sa (LI_item 50 entl) ea (LI_item 51 entl) Rad (LI_item 40 entl) vlist (list (polar CenPt sa Rad) (polar CenPt ea Rad)) ) ) ((= en "3DFACE") (setq vlist (list (LI_item 10 entl) (LI_item 11 entl) (LI_item 12 entl) (LI_item 13 entl) ) ) ) ) vlist ) (defun LI_item (n alist) (cdr (assoc n alist)) )
greetings and thanks for answering !!!