Sooshiant Posted September 20, 2016 Posted September 20, 2016 When you select some points and type list, AutoCad brings a list of some data such as point coordinate and layer name or color etc. On the other hand if you have a large number of points you need to press enter and go to next page. One year ago I saw a lisp routine which could list all point coordinates in list window without any further unnecessary data, so you could copy and paste all your selected point coordinates to a text file or excel at once. Now I have lost that great lisp. That was something like this pic (this has created by Photoshop) If anyone have it please give it to me or please write a lisp like this for me again. Any help would be greatly appreciated. Quote
Lee Mac Posted September 20, 2016 Posted September 20, 2016 (defun c:lixt ( / i s ) (if (setq s (ssget '((0 . "POINT")))) (repeat (setq i (sslength s)) (princ (apply 'strcat (mapcar 'strcat '("\n\tX=\t" "\tY=\t") (mapcar 'rtos (cdr (assoc 10 (entget (ssname s (setq i (1- i))))))) ) ) ) ) ) (princ) ) Quote
Grrr Posted September 20, 2016 Posted September 20, 2016 (defun c:lixt ( / i s ) (if (setq s (ssget '((0 . "POINT")))) (repeat (setq i (sslength s)) (princ (apply 'strcat (mapcar 'strcat '("\n\tX=\t" "\tY=\t") (mapcar 'rtos (cdr (assoc 10 (entget (ssname s (setq i (1- i))))))) ) ) ) ) ) (princ) ) I bet it took you less time, than OP had to write its request. Quote
Sooshiant Posted September 20, 2016 Author Posted September 20, 2016 You are a genius I love you Quote
Grrr Posted September 20, 2016 Posted September 20, 2016 I've just played with it a little.. and an idea hit me: By changing the pdmode variable, the viewport regens automatically, so heres some weird test condition to determine if a regen was successful: _1$ (setvar 'pdmode (getvar 'pdmode)); can be used instead of regen, which is funny 35 _1$ (vla-regen (vla-get-activedocument (vlax-get-acad-object)) acActiveViewport) nil _$ (= (getvar 'pdmode) (setvar 'pdmode (getvar 'pdmode))) T _$ (if (= (getvar 'pdmode) (setvar 'pdmode (getvar 'pdmode))) (print "Yes") (print "No") ) "Yes" "Yes" _$ I have absolutely no idea where this would be practical, just wanted this info to stay in the archives. Quote
Roy_043 Posted September 20, 2016 Posted September 20, 2016 Note that the _LIST command will translate geometrical data to the current UCS. Quote
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.