Jump to content
Sooshiant

Need a lisp to LIST all selected point coordinate at once

Recommended Posts

Sooshiant

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)

 

01.jpg

 

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.

Share this post


Link to post
Share on other sites
Lee Mac
(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)
)

Share this post


Link to post
Share on other sites
Grrr
(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.

Share this post


Link to post
Share on other sites
Sooshiant

You are a genius I love you :)

Share this post


Link to post
Share on other sites
Grrr

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.

Share this post


Link to post
Share on other sites
Roy_043

Note that the _LIST command will translate geometrical data to the current UCS.

Share this post


Link to post
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...