Is this LISP routine what you're looking for?
Hy everyone!!! I have a problem, I draw polyline (2D) and need lisp that ''reads'' my pline and extract ''pick points'' with coordinates (X,Y in this case there is no Z coordinate), so these points must extract to new file txt/csv/xls, or just to put points on that polyline... Maybe this question is solved in the past on this forum...but didn't find it...anybody????
"I have only come here seeking knowledge. Things they wouldn't teach me of in college." The Police
Eat brains...gain more knowledge! N-E-S-T-L-E-'S, Nestle's makes the very best......chocolate.
Or look this
Export of coordinates of the specified points, the chosen objects: points, blocks, polylines, splines in a text file or Excel.
Text file — txt, or csv.
A rounding off of coordinates according to current adjustments of a command _UNITS (LUPREC system variable)
3 commands Are certain
COOR - export of coordinates
COORN-export of coordinates with numbering. Numbers of points are drawn by the text on the current layer, the current style, current height (TEXTSIZE)
COORT-export of coordinates with numbering where number considers the text nearest to a point
Thx for posting that, I already used that lisp, and it helped me...but is there a option when I draw pline, lisp puts dots on insertion places on that pline?? and after that I use COOR lisp and pick up all that coordinates (I need that because i need manually enter Z coord in that particular places)...THX for posting hyperlink..
Give it a shot. It save on ".csv" format, separated by ","
Code:(defun c:plex() (setq el (entget (car (entsel "\n Select the pline to extract: ")))) (setq file (open (getfiled "Output file" "" "csv" 9) "w")) (repeat (setq i (length el)) (if (= (car (setq l1 (nth (setq i (1- i)) el))) 10) (write-line (strcat (rtos (cadr l1)) "," (rtos (caddr l1))) file) ) ) (close file) (princ) )
If I have correctly understood, command COORNP is necessary to you
Registered forum members do not see this ad.