ayman_48 Posted May 11, 2016 Share Posted May 11, 2016 hi everybody i will be thank's if someone help me:- i have poly line with 50 vertex i need lisp to extract this vertex coordinates X,Y into text file Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 Hi, Is it LWpolyline or 3Dpolyline? Quote Link to comment Share on other sites More sharing options...
ayman_48 Posted May 11, 2016 Author Share Posted May 11, 2016 Hi, Is it LWpolyline or 3Dpolyline? 2D polyline Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 With comma or space separated? Quote Link to comment Share on other sites More sharing options...
ayman_48 Posted May 11, 2016 Author Share Posted May 11, 2016 With comma or space separated? with comma please Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 Last question: what about the precision number of coordinates ? Quote Link to comment Share on other sites More sharing options...
ayman_48 Posted May 11, 2016 Author Share Posted May 11, 2016 Last question: what about the precision number of coordinates ? 3 number and i will be thank's for help Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 Try it and let me know: (defun c:Test (/ ss fl op) ;; Tharwat. 11.May.16 ;; (princ "\nSelect LWpolylines:") (and (setq ss (ssget '((0 . "LWPOLYLINE")))) (setq fl (getfiled "Specify txt file name:" (getvar 'DWGPREFIX) "txt" 1)) (setq op (open fl "w")) (progn ((lambda (i / sn p) (while (setq sn (ssname ss (setq i (1+ i)))) (mapcar '(lambda (x) (and (= (car x) 10) (setq p (cdr x)) (write-line (strcat (rtos (car p) 2 3) "," (rtos (cadr p) 2 3)) op ) ) ) (entget sn) ) ) ) -1 ) (close op) ) ) (princ) ) Quote Link to comment Share on other sites More sharing options...
ayman_48 Posted May 11, 2016 Author Share Posted May 11, 2016 Try it and let me know: (defun c:Test (/ ss fl op) ;; Tharwat. 11.May.16 ;; (princ "\nSelect LWpolylines:") (and (setq ss (ssget '((0 . "LWPOLYLINE")))) (setq fl (getfiled "Specify txt file name:" (getvar 'DWGPREFIX) "txt" 1)) (setq op (open fl "w")) (progn ((lambda (i / sn p) (while (setq sn (ssname ss (setq i (1+ i)))) (mapcar '(lambda (x) (and (= (car x) 10) (setq p (cdr x)) (write-line (strcat (rtos (car p) 2 3) "," (rtos (cadr p) 2 3)) op ) ) ) (entget sn) ) ) ) -1 ) (close op) ) ) (princ) ) perfect work man thank's very much جزاك الله خيرا Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 You are most welcome. Quote Link to comment Share on other sites More sharing options...
Grrr Posted May 11, 2016 Share Posted May 11, 2016 Tharwat being awesome as always. Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 11, 2016 Share Posted May 11, 2016 Tharwat being awesome as always. That's too kind of you to say. Quote Link to comment Share on other sites More sharing options...
byou19 Posted May 6, 2018 Share Posted May 6, 2018 thank you Tharwat Quote Link to comment Share on other sites More sharing options...
Tharwat Posted May 6, 2018 Share Posted May 6, 2018 thank you Tharwat You're welcome anytime. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.