XREFs are one of the most powerful and the most confounding tools that AutoCAD and other CAD programs have introduced. Get them right (which is actually easy to do) and your work is much easier and well coordinated. Get them wrong (which can happen) and you can get twisted into a knot so tight that you cannot get out of it.
One of the most important parts of XREFs are the paths that they use to find the files. You can use Hard coded paths or relative paths. Read more about these options here.
So here are some thing you could add to your CAD Standard about creating and using XREFs.
Xref Path Names
All Reference file attachments will be saved using relative paths. Relative paths do not include the drive letter and reflect the location of the reference file as it relates to the active file.
Relative path names can be created in AutoCAD by using a shareware program called XRP. AutoCAD 2004 and beyond has a variable setting to allow for relative paths.
Reference files shall be added on a specific layer and the prefix for that layer shall be “$xref-“ followed by the reference file name. “$nref-” shall be used as a prefix when attaching nested reference files to model files.
Only use one level of nesting. Do not overuse nested reference files. Attaching a file to create a Nested XREF should only be done on Model files. Do not create nesting on Sheet files.
The lisp routine “XRP” will correct the hard coded paths to relative paths in AutoCAD 14 thru 2010. AutoCAD 2004 and beyond allows for attachments with relative paths. It must be done at the time of attachment or fixed with XRP after the fact. Get XRP – you need it.
July 21st, 2009 at 1:18 AM
Can anyone tell me why relative path is sometimes not allowed??
July 28th, 2009 at 6:43 AM
If you mean that it will not allow you to check the box…
I have seen it do this if the file was just attached and you forgot to check the box before attaching. Not sure why this happens.
Download XRP and run that – it will fix it.
https://www.caddmanager.com/CMB/2007/01/relative-xref-path-fix-xrp/
August 18th, 2009 at 10:33 AM
if the file u are attempting to reference an XRef into is not saved, it will not allow you to use relative path, as it can not create a directory base point to start from.
August 18th, 2009 at 12:11 PM
This is true. You must save the file after the attachment at least once. Then run XRP.
August 4th, 2010 at 9:49 PM
hi, i just started learning how to create lsp and i have a problem creating an lsp command “defun c:xn” that moves a selected x-ref to layer “la-xref” and identify xref name in the command line.
And a separate command “defun c:xx” to load and unload a selected xref.