Jump to content

Recommended Posts

Posted

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.

Posted
(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)
)

Posted
(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.

Posted

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.

Posted

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

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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  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...