CADDManager on December 10th, 2006

I have had so many users who have had troubles with projects and delivering files because they used Hard Coded Paths (Full Path) for Xrefs.

Full Path stores the location of the file that you have attached starting from the drive letter and moving down the tree to where the file is located.

C:\Documents and Settings\mkiker\My Documents\Acad2007\XREF\Wall Base.dwg

So it starts from the “C” drive – or wherever and travels down the tree to find the DWG file.

If the drive letter changes because you move the project or you send the files to someone else and they do not put the files in the exact locations (including drive letter) that you did – the file does not load in AutoCAD.

Enter Relative Paths…

Relative Paths start from the location of the host file and moves to where the XREF file is located.

..\XREF\Wall Base.dwg

So it starts looking by backing out of the folder of the host (the two dots) and moves into subfolders to find the XREF.

Both ways will find the file when you first load it. Relative Paths will ensure that the file is found in the future in more cases that Full Path.

Here is where you set it in AutoCAD 2007. Open the XREF palette or Dialog box and look for the Path type option. This only appears when you are actually loading the file the first time. The default is Full Path.

Here is how to change it once it is set in 2007.

Select the XREF you need to change and highlight the area of the path that you need to change.

Now – just type in two dots “..” in place of that full path and hit Enter. Be sure to leave the backslash after the two dots. If you have to back up two folders before going into a subfolder the use two sets of dots “..\..”

It sure would be nice to have a tool inside AutoCAD (not on the Start Menu) that would do this quickly. Do you know of one?

21 Responses to “AutoCAD 2007 Xrefs – Relative Paths”

  1. I got excited when I saw this blog title, thinking that maybe AutoCAD 2007 has finally fully implemented relative paths. But I see that they have not, and you’ve given the tip of just backspacing the upper level path info, leaving the appropriate ..\path info. AutoCAD began addressing relative paths with R2004, when attaching an XREF. But there’s no way to easily and automatically convert existing FULL xref paths to relative ones, after the fact.

    I find that most users have no clue about how to edit the path manually to strip out the unnecessary part. And if the folder structure is complicated, it can admitted be difficult in figuring this out. CAD veterans from the old DOS days know what ..\ means…. the younger people today have no concept of this.

    I wrote an XRP (Xref Relative Path) utility way back in R14 AutoCAD, that automatically converts full XREF and IMAGE paths to be relative. I keep waiting for my utility, written over 7 years ago, to become moot. But I guess I need to hang onto it for a while longer.

    Interesting, in an early incarnation of Buzzsaw, they had a Buzzsaw/ProjectPoint plugin for AutoCAD, which was great for automatically posting DWGs up to Buzzsaw. One of the tools in the AutoCAD plugin, was a tool to convert XREF paths to be relative. In some common folder structure situations, the utility failed to appropriately convert the path, but at least it was a good try and the 1st indication that I saw that Autodesk was even aware of the need. It was a short-lived Buzzsaw/AutoCAD plugin, retired not long after the utility was developed.

  2. I fully endorse XRP – it is a great tool and I have used it extensively.

  3. Relative pathing is impossible for us! We work on small towns and large theme parks with a dozen disciplines. The only way to keep hundreds of xrefs organized is through a simple but sophisticated folder structure. Relative pathing works in only ONE DIRECTION, that is, it only looks in the dwg’s subfolders to find xrefs. We need AutoCAD to be able to search all subfolders of the root project not just direct subfolders. Currently the root is where the dwg is located, however we suggest that Autodesk allow the root to be the job folder with all subfolders searchable in a relative path. Until this is done it is hard pathing all the way,

  4. I do not concur with Mr. Penzinger’s statement that “Relative pathing works in only ONE DIRECTION, that is, it only looks in the dwg’s subfolders to find xrefs”. As far as I’m aware, relative pathing works both ways in AutoCAD, in subfolders (below) the current folder location, and in upper level folders above the folder location. It just can’t jump drives, in other words, if an XREF exists on a different drive, then that’s a physical limitation to relative pathing in general.

    My XRP.LSP utility does indeed figure relative pathing above, below, or lateral to the current DWG’s folder location. It’ll repath right up to the root directory folder if an XREF or IMAGE file is there. If XREF files are in folders 3 levels above the current folder location, it’ll take the form of ..\..\..\someFolderName.

  5. I would love to get a hold of XRP.LSP (if it is freely available). If so, would you please tell me where I can download it?


  6. My XRP2004.lsp utility is available from:\cad\cad_utils.htm or follow this link:

  7. Mark

    I stand corrected, I have not explored relative pathing in Autocad in almost a decade. Either Autocad has been corrected to solve traversing lateral paths or I have just always been wrong. Either way it does seem to traverse lateral paths quite nicely. Thank you for this knowledge. I am seriously considering changing our standard practice. Cheers

  8. I really needed to say something about this topic…
    How many times have I open a drawing just to find out that a lot of the xref are not found. Many users like creating a project search path but when you work on as many projects as I and my company does, using that method is just not an option. Using XRP not only frees the users of worrying xref not found it’s also nice to be able to burn CD’s and be able to open a drawing within that CD and still see all the xref attached. AutoCAD has continue (in my opinion) to drop the ball on this one. XRP ROCK…!!!

  9. CadDog, try using the eTransmit to create a zip to put onto an archive CD. It’s a nice way to archive a drawing and continue to have the xrefs in place.

  10. Use the command REDIR

  11. if you simply path to the xref folder in your acad start shortcut, then all xrefs will resolve, regardless of saved path, relative path, or no path.

  12. In general, relative XRefs are very nice to use when giving your drawings to someone outside. Unfortunately, AutoCAD 2008 still doesn’t handle them correctly. Try this scenario:

    Add an xref into the current drawing (any xref would do, but for this just use one in the same folder as the current). Ensure that relative path is enabled (as per above sample). You end up with the XRef path just being the DWG filename. Now, saveas to a different directory. Close & reopen that drawing … the XRef is not found. If you used the full path option, this wouldn’t be a problem.

    What I think should happen is that the eTransmit should automatically change all included XRefs to be relative in the transmitted files. Or AutoCAD needs to translate a relative path if saved to a new folder / copied from another drawing.

  13. I’ve been using the XRP2004 lisp and i love how it works. We just recently switched from AutoCAD 2007 to AutoCAD 2010 and the lisp doesn’t work anymore. Does anyone have an idea what needs to be modified to make it work in 2010 or have found an updated version?

  14. I have updated XRP14.lsp to work in AutoCAD 2010. Contrary to what my web page says (that it hasn’t been tested in AutoCAD 2010), the utility has been tested in AutoCAD 2010. You can download it from the URL below.

  15. Thanks antennaria, I was looking for this!! It works perfectly!

    Kind regards,


  16. Thanks a ton.

  17. That lisp routine is the best, especially for myself who often telecommutes. There was always an issue (repathing everything) when I would work on files outside of the office & then had to redo the paths once back in the office.


  18. I have problem in xref insert window.But only in one file.
    In this file when am trying to attach a dwg file the factor value is showing 25 and I cannot change this value. Can anyone help me to solve this problem? How can I change this value from 25 to any number?

  19. Hi Antennaria,

    Thanks a million for the XRP script. Its a godsend!!! I do have a very small request… we work with a lot of files stores in our shared storage and they are not mapped as regular drives (E:, F:, etc) but straight out of the server name (\\servername\share\etc..). Originally, XRP recognized this as already a relative path and didnt change it. So far, I just hacked it (changed the match pattern from *:* to *\\\\*) and it works, but only for network shares ;-)… is there any chance you could try to get this option in there? I realize this is an awfully old thread, but im totally new at LISP.

    Thanks in advance!

  20. Can you include image and sid files to this .lsp?

  21. use the “redir” to convert the absolute path to a specified one.

Leave a Reply