+ Reply to Thread
Results 1 to 7 of 7
  1. #1
    Junior Member
    Computer Details
    Sooshiant's Computer Details
    Operating System:
    Windows 8
    CPU:
    Celeron
    RAM:
    8 GiG ddr3
    Using
    AutoCAD 2014
    Join Date
    Mar 2014
    Location
    Iran
    Posts
    15

    Default Need a lisp to LIST all selected point coordinate at once

    Registered forum members do not see this ad.

    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.

  2. #2
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,322

    Default

    Code:
    (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)
    )
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  3. #3
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    1,067

    Default

    Quote Originally Posted by Lee Mac View Post
    Code:
    (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.

  4. #4
    Junior Member
    Computer Details
    Sooshiant's Computer Details
    Operating System:
    Windows 8
    CPU:
    Celeron
    RAM:
    8 GiG ddr3
    Using
    AutoCAD 2014
    Join Date
    Mar 2014
    Location
    Iran
    Posts
    15

    Default

    You are a genius I love you

  5. #5
    Quantum Mechanic Lee Mac's Avatar
    Computer Details
    Lee Mac's Computer Details
    Operating System:
    Windows 7 Ultimate (32-bit)
    Discipline
    Multi-disciplinary
    Lee Mac's Discipline Details
    Discipline
    Multi-disciplinary
    Details
    Custom Programming / Software Customisation
    Using
    AutoCAD 2013
    Join Date
    Aug 2008
    Location
    London, England
    Posts
    19,322

    Default

    Cheers guys
    Lee Mac ProgrammingTwitterExchange App StoreDropbox (500MB free)

    With Mathematics there is the possibility of perfect rigour, so why settle for less?

  6. #6
    Super Member
    Discipline
    Multi-disciplinary
    Using
    AutoCAD 2015
    Join Date
    Nov 2013
    Posts
    1,067

    Default

    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:
    Code:
    _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.

  7. #7
    Super Member
    Using
    not applicable
    Join Date
    Jun 2016
    Posts
    526

    Default

    Registered forum members do not see this ad.

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

Similar Threads

  1. [Lisp] How to filter list of point to get external contour
    By ziele_o2k in forum AutoLISP, Visual LISP & DCL
    Replies: 4
    Last Post: 20th Jul 2016, 06:33 pm
  2. Identify Selected Coordinate System
    By aaryan in forum AutoLISP, Visual LISP & DCL
    Replies: 1
    Last Post: 4th Mar 2014, 11:13 pm
  3. coordinate point list (*.txt file) and table
    By prodromosm in forum AutoLISP, Visual LISP & DCL
    Replies: 24
    Last Post: 19th Nov 2013, 07:12 am
  4. LISP routine that shows XYZ coordinate of a selected point
    By tzframpton in forum AutoLISP, Visual LISP & DCL
    Replies: 20
    Last Post: 27th Mar 2010, 02:53 pm
  5. List coordinate by select point group
    By jason tay in forum AutoLISP, Visual LISP & DCL
    Replies: 37
    Last Post: 27th Apr 2009, 12:36 am

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts