Please help. Unsolved AutoCad Xref Problem
Please help. Unsolved AutoCad Xref Problem
(OP)
Hello,
Please help. I have an AutoCad drawing, which has a lot of Xref (external reference - collecting drawings from another location/folder in my computer and then posting them into a single AutoCad drawing). Recently, I renamed some Xref files and moved them into a different folder/location.
When I reopen my AutoCad drawing, some of my drawings cannot be displayed because some Xref are missing or not loaded (due to renaming and moving them into a different folder/location, which Autocad don't know how to locate them)
So currently i start fixing the Xref path by browsing each file to the correct name & path of the new location.
For a lot of Xrefs, this is very painfull. =) I am just wondering if there is a VBA code, which can help me fix this Xref issue. My first thought is to list all Old Xrefs (drawing name & its location) and New Xrefs in 1 folder, plug them into a VBA code, and run the VBA code in the AutoCad. Therefore, the program can match/compare the old and new Xref name & its location and automatically repath the Xref for me. Please let me know if this can be done. This really helps. Thank you in advance for your help.
Yudha
Please help. I have an AutoCad drawing, which has a lot of Xref (external reference - collecting drawings from another location/folder in my computer and then posting them into a single AutoCad drawing). Recently, I renamed some Xref files and moved them into a different folder/location.
When I reopen my AutoCad drawing, some of my drawings cannot be displayed because some Xref are missing or not loaded (due to renaming and moving them into a different folder/location, which Autocad don't know how to locate them)
So currently i start fixing the Xref path by browsing each file to the correct name & path of the new location.
For a lot of Xrefs, this is very painfull. =) I am just wondering if there is a VBA code, which can help me fix this Xref issue. My first thought is to list all Old Xrefs (drawing name & its location) and New Xrefs in 1 folder, plug them into a VBA code, and run the VBA code in the AutoCad. Therefore, the program can match/compare the old and new Xref name & its location and automatically repath the Xref for me. Please let me know if this can be done. This really helps. Thank you in advance for your help.
Yudha





RE: Please help. Unsolved AutoCad Xref Problem
Cadd Standards should be created/obtained including file directory structure and naming conventions up front before a project is started. Granted you won't be able to forsee some issues until you get into them but it does help.
And then any issues that come up, you can add into the plan.
I am sure you could get a program to work but you would need to know old name, old location, new name, new locations etc... not my kind of thing.
RE: Please help. Unsolved AutoCad Xref Problem
Variations from your idea are possible: like exporting XREF names to Excel, writing the replacements in the next column, reimporting etc.
See my VBA macro that edits other texts in the drawing via exporting to Excel and importing translations back. Gives you an idea of the possibilities.
www.homescript.com
RE: Please help. Unsolved AutoCad Xref Problem
RE: Please help. Unsolved AutoCad Xref Problem
From Autocad, ALT+F11
This opens the VBA editor.
Menu-Help- Search -
XREF
Object models
Example
Step 1 - Read all Xrefs in the currently open drawing and write to a txt file (full path and file name)
RE: Please help. Unsolved AutoCad Xref Problem
good luck!
RE: Please help. Unsolved AutoCad Xref Problem
-Eric Foulds