Message 1 of 12

Not applicable
11-07-2016
06:02 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hello,
in this case I have different polylines and each was drawn in its own corresponding layer. I want to get the coordinates of the points of the plines written in a txt file.
(defun polyout() (setq i 0) ;Zählschleife (setq Polycoordinates (open "C:/Temp/Polycoordinates.tmp" "w")) (setq CEbenenfile (open "C:/Temp/CEbenen.tmp" "r")) (while (< i Mc) ;while-Schleife zum Einlesen der C-Ebenen (progn (setq zeileCE_string (read-line CEbenenfile)) (if zeileCE_string ;Abfrage ob Wert in txt drin steht (progn (setq zeileCE_wert (atof zeileCE_string)) (setq lay_current (strcat "C" (AddLeadingZeros (rtos zeileCE_wert 2 0) 3) ;z.B. C000-Ebene "-EBENE" );strcat );SETQ (if (setq sset (ssget "X" '((0 . "LWPOLYLINE,POLYLINE")))) (progn (setq ed (entget (sset))) (setq p (cdr (assoc 10 ed))) (write-line p Polycoordinates) );PROGN );IF );PROGN );IF (setq i (+ i 1)) );PROGN );WHILE (close CEbenenfile) (close Polycoordinates) );DEFUN
The code before >>
(if (setq sset (ssget "X" '((0 . "LWPOLYLINE,POLYLINE"))))
<< is correct. So choosing the layer is working. I just don't know how the get the information of the polylines in a txt.
Solved! Go to Solution.