Extracting the xref file names loaded
Extracting the xref file names loaded
(OP)
Is there away of extracting the xref file names loaded in a drawing. So that the file names can be printed on the drawing, say using a field. Is there a system variable that this info is stored in?





RE: Extracting the xref file names loaded
RE: Extracting the xref file names loaded
I would use "_rtext" from the Express Tools.
A field isn't working, except You would find a lisp...
Lothar
ADT 2004
ACAD 2002
RE: Extracting the xref file names loaded
;------------------------------------------------------------------------------
;GETXREFS: Returns a list
;------------------------------------------------------------------------------
(defun GETXREF (/ ABLOCK ACTIVEDOC ITEM THEBLOCKS THELIST YESXREF)
;retrieve a reference to the Active Document
(setq ACTIVEDOC (vla-get-activedocument (vlax-get-acad-object)))
;retrieve a reference to the blocks
(setq THEBLOCKS (vla-get-blocks ACTIVEDOC))
;create an empty list
(setq THELIST '())
;process each block
(vlax-for ITEM THEBLOCKS
;check if it's an Xref
(setq YESXREF (vlax-get-property ITEM 'ISXREF))
;if it is
(if (= YESXREF :vlax-true)
;do the following
(progn
;get the Xref name
(setq ABLOCK (vlax-get-property ITEM 'NAME))
;store it in the list
(setq THELIST (append (list ABLOCK) THELIST))
) ;progn
) ;if
) ;vlax-for
;print the list
THELIST
) ;defun
"Everybody is ignorant, only on different subjects." — Will Rogers
RE: Extracting the xref file names loaded
LISP routine worked well, it extracted the xref names as I wanted. Any ideas on how to pull the list into my drawing automaticly so it can be printed?