list of Xrefs

Discussion in 'AutoCAD' started by Laura, Jul 30, 2004.

  1. Laura

    Laura Guest

    Hi,

    Is there a lisproutine that makes a list (for example in a txt-document)
    with the names of all the attachted Xrefs in a drawing, including if they
    are unloaded or loaded and the xrefspath? I'm using AutoCAD 2000.

    Laura
     
    Laura, Jul 30, 2004
    #1
  2. Laura

    Laura Guest

    I've found a lisproutine posted by Randy benson for finding xrefs in a
    drawing.
    (post method of testing for XREFS date 29-06-2004)

    Is there also a way for a list of the xrefs inside the xrefs? Or do I have
    to open them individual and repeat the command?
    And is it possible to show the unloaded xrefs aswell?

    thanks

    Laura



    ; ListXrefs - well, it lists all xrefs w/full paths
    : Randy benson

    (defun c:lx ( / ss cnt xrs en ed cnt bn xp)

    (defun dxf (i a) (cdr (assoc i a)))

    (setq ss (ssget "x" '((0 . "INSERT")))
    cnt 0
    xrs (list)
    )
    (while (< cnt (sslength ss))
    (setq en (ssname ss cnt)
    ed (entget en)
    cnt (1+ cnt)
    bn (dxf 2 ed)
    )
    (if (/= 0 (logand 12 (dxf 70 (tblsearch "BLOCK" bn)))); is an Xref?
    (progn
    (setq xp (dxf 1 (entget (tblobjname "block" bn)))
    xrs (cons (cons bn xp) xrs)
    )

    )
    )
    )
    (foreach n xrs (princ (strcat "\n" (car n) " " (cdr n))))
    (princ)
    )
     
    Laura, Jul 30, 2004
    #2
  3. It can be done without a lisp routine.

    Type this at the Command line: -xref (notice the hyphen at the beginning).
    and the type this: ? (question mark). Then you can copy and paste it into
    a text file.

    Here is an example of it's use:

    ------------------------------------------------

    Command: -xref

    Enter an option [?/Bind/Detach/Path/Unload/Reload/Overlay/Attach] <Attach>:
    ?

    Enter xref name(s) to list <*>:


    Xref name Xref Type Path
    ---------------------- --------- ----------

    "X_COL" Overlay 0403-COL.dwg
    "X_FPA" Overlay 0403-FPA.dwg
    "X_RCP" Overlay 0403-RCP.dwg
    "X_TB" Overlay 0403-TB.dwg

    Total Xref(s): 4
     
    Gary Lafreniere, Jul 30, 2004
    #3
  4. Laura

    Laura Guest

    Thanks,
    Sometimes the solutions are so easy :)

    greetings
    Laura



     
    Laura, Aug 2, 2004
    #4
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.