Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Extracting the xref file names

6 REPLIES 6
Reply
Message 1 of 7
Anonymous
587 Views, 6 Replies

Extracting the xref file names

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?
6 REPLIES 6
Message 2 of 7
Anonymous
in reply to: Anonymous

I use the rtext from express tools eg .

Xref: $(xrefs,2,Includes: )

I put this on my drawing mask, same again with the plot stamp command :-

ACAD REF: $(getvar, "dwgprefix")$(getvar, "dwgname") $(edtime, 0, MON DD"," YYYY - H:MMam/pm)

If an autoCAD user does not have express loaded on their machine, these functions will only show blank boxes.

Hope it helps
Message 3 of 7
Anonymous
in reply to: Anonymous

I would not recommend using RText, especially if you are using fields
already. However, there is no field expression that will directly get the
XRefs.

However, there has been code posted in this discussion group in the past
that generates a string or list of the XRefs loaded. You could use that code
to populate a UserSx system variable and use a field to read/display that.

--
R. Robert Bell


wrote in message news:5418884@discussion.autodesk.com...
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?
Message 4 of 7
scot-65
in reply to: Anonymous

Cadance,

Here is partial code to find the XRef objects in a drawing.
The file name of the xref is DFX 2, provided the block has not been renamed. Also, the xref name is not sorted if you gather all in a selection set.

(while (setq d (tblnext "BLOCK" (not d)))
(if (assoc 1 d)...

Good Luck!

Scot-65

Scot-65
A gift of extraordinary Common Sense does not require an Acronym Suffix to be added to my given name.


Message 5 of 7
Anonymous
in reply to: Anonymous

A userSx system variable?

What good is that?

It doesn't get saved.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

"R. Robert Bell" wrote in message news:5419382@discussion.autodesk.com...
I would not recommend using RText, especially if you are using fields
already. However, there is no field expression that will directly get the
XRefs.

However, there has been code posted in this discussion group in the past
that generates a string or list of the XRefs loaded. You could use that code
to populate a UserSx system variable and use a field to read/display that.

--
R. Robert Bell


wrote in message news:5418884@discussion.autodesk.com...
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?
Message 6 of 7
Anonymous
in reply to: Anonymous

Without RTEXT or a custom field evaluator, there
is no simple way to automate that.

My advice is to avoid RTEXT, as it has been the
source of numerous problems with customization.

You can use LISP code that reacts to events that
fire when xrefs are attached/detached, and then
store and manage the names of the attached xrefs
in a custom drawing property that can be used in
a field.

What Robert suggests (storing it in a userSx system
variable) is really pointless because it is not stored
with the drawing, and can't be used outside of the
drawing editor (e.g., not much different than using
LISP in fields).

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006/2007
http://www.acadxtabs.com

wrote in message news:5418884@discussion.autodesk.com...
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?
Message 7 of 7
Anonymous
in reply to: Anonymous

Good point. Background publish would have a fit. Document properties is a
better spot.

--
R. Robert Bell


"Tony Tanzillo" wrote in message
news:5420076@discussion.autodesk.com...
A userSx system variable?

What good is that?

It doesn't get saved.

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Forma Design Contest


AutoCAD Beta