×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Extracting the xref file names loaded

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

I would use the XREFCTL command and set it to one(1) to create a ASCII log file that will have a .XLG extension.  You should be able to modify the ASCII log file, then paste and copy to your drawing.

RE: Extracting the xref file names loaded

cadace,

I would use "_rtext" from the Express Tools.

Quote:

The $(xrefs) DIESEL function
RText supports listing Xref files attached to a drawing through the $(xrefs) DIESEL function.

A field isn't working, except You would find a lisp...

Lothar

ADT 2004
ACAD 2002

RE: Extracting the xref file names loaded

LISP routine

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

(OP)
Thanks Burgunit
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?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources