×
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

Please help. Unsolved AutoCad Xref Problem

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

RE: Please help. Unsolved AutoCad Xref Problem

My suggestion would be don't move xref's or rename them once a project is started. This only cause's more work and a loss of money in the end. This stress' the fact that
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

Your VBA idea is very feasible. It can be done.
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

(OP)
Hello, Thanks for the input. However, I am still not sure how this can be done. Can you help me through? Thank you again

RE: Please help. Unsolved AutoCad Xref Problem

Would be a pleasure if you do the starting:
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

(OP)
My suggestion is to attach any future xrefs as overlays with the file path box checked to save the path. This allows you to attach as many xrefs as you want from as many differant locations as you want....and AutoCad finds your drawing on it's own. We have started overlaying our attachments and have been verry happy with the results....otherwise I guess you can always bind your drawing using bind not insert.
 
good luck!

RE: Please help. Unsolved AutoCad Xref Problem

Try looking on Cadalog.com and searching for files related to "xref".  I recall seeing a routine on there that does what you seem to need.  I hope all goes well for you, as I have also had to go through this with saved paths coming into play after moving a local drawing to the server for backup.

-Eric Foulds

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