Author Topic: Xref path help needed.  (Read 12148 times)

0 Members and 1 Guest are viewing this topic.

hudster

  • Gator
  • Posts: 2848
Xref path help needed.
« on: November 13, 2005, 06:32:50 AM »
I really need a hand with an Xref problem.

We have installed new servers at work, and due to working practice changes the xref paths for all of our projects have changed and I need to be able to repath over 10 years of work to suit the new folder structures.

The system used to be "x:/dwg/05/ blah blah blah" but now it has changed to "x:/dwg/glasgow/05/ blah blah blah"

Is there an easy way to add the "/glasgow" part to the xref path without having to open thousands of drawings and browse to each one?
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

MikePerry

  • Guest
Re: Xref path help needed.
« Reply #1 on: November 13, 2005, 06:51:50 AM »
Hi

If using AutoCAD 2004 or greater, take a look at Reference Manager.

A stand-alone utility that is found in your AutoCAD installation area ie Start -> All Programs -> Autodesk -> AutoCAD...

Have a good one, Mike

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Xref path help needed.
« Reply #2 on: November 13, 2005, 09:09:07 AM »
I think Mike's recommendation if the way to go.
Have you have checked these out as well.

http://www.theswamp.org/forum/index.php?topic=1170.msg15055#msg15055

« Last Edit: November 29, 2005, 08:33:15 AM by CAB »
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

pmvliet

  • Guest
Re: Xref path help needed.
« Reply #3 on: November 14, 2005, 11:10:28 AM »
If you need to do it on 2000 file format, there is a reference manager for that as well. If you use the 2004/5/6 version, you will migrate all your files up to the new version when you do that.

It will work very well and do what you need, however it might take a little while if you have lots of files. Sometimes the program will hang up if you load in over 100 files at a time. it really doesn't hang up, it just seems like it does. If you just let it think and go get a donut or something it'll be there when you get back.

If you need help ask away as I use it all the time.

Pieter

deegeecees

  • Guest
Re: Xref path help needed.
« Reply #4 on: November 14, 2005, 12:52:11 PM »
Id roll something like this (condensed):

Open dwg
Has xref
Replace old string w/ new string
Save path

Call this from acad2XXXdac.lsp

whdjr

  • Guest
Re: Xref path help needed.
« Reply #5 on: November 14, 2005, 01:23:14 PM »
...
Call this from acad2XXXdac.lsp

Is that a new lsp file name or just your hand rolled version of the acad2XXXdoc.lsp?

 :lmao: :lmao:

Edit:  Sorry D.  I couldn't resist.

deegeecees

  • Guest
Re: Xref path help needed.
« Reply #6 on: November 14, 2005, 01:28:46 PM »
...
Call this from acad2XXXdac.lsp

Is that a new lsp file name or just your hand rolled version of the acad2XXXdoc.lsp?

 :lmao: :lmao:

And I wrote my own AutoCad native language called AutoLasp.

Quote
Edit: Sorry D. I couldn't resist.

Ditto

 :evil:

hudster

  • Gator
  • Posts: 2848
Re: Xref path help needed.
« Reply #7 on: November 29, 2005, 06:03:19 AM »
OK i've been using refernece manager, but it's way too time consuming to repath every project we have.
Is there any way using lisp I can Automaitically get the xref path, so I can alter to suit the new path?

You would think there would be a variable like DWGPREFIX, but I can't find anything.
Revit BDS 2017, 2016, 2015, 2014, AutoCAD 2017, 2016, Navisworks 2017, 2016, BIM360 Glue

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Xref path help needed.
« Reply #8 on: November 29, 2005, 08:39:52 AM »
Did you check out the link I provided?
I suspect you will have to use it in a Script as well to automate the process.
I've reached the age where the happy hour is a nap. ()
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Bob Wahr

  • Guest
Re: Xref path help needed.
« Reply #9 on: November 29, 2005, 12:14:06 PM »
I think jjs wrote a VB app a couple of years back that would repath xrefs.  You might try contacting him.

deegeecees

  • Guest
Re: Xref path help needed.
« Reply #10 on: November 29, 2005, 12:21:10 PM »
I've got something that will repath to UNC, its a start if you'd like to pick it apart.

CTMill

  • Newt
  • Posts: 120
Re: Xref path help needed.
« Reply #11 on: November 29, 2005, 12:38:11 PM »
Sounds good, but I've never found an easy way to do this.  (we upgraded servers recently too)

Do you have Toolpac?  Try their version of the Ref. Manager (Repath) in the Drawing menu.  Its really easy to use. 


OK i've been using refernece manager, but it's way too time consuming to repath every project we have.
Is there any way using lisp I can Automaitically get the xref path, so I can alter to suit the new path?

You would think there would be a variable like DWGPREFIX, but I can't find anything.
Civ3d/A2K16

MP

  • Seagull
  • Posts: 17750
  • Have thousands of dwgs to process? Contact me.
Re: Xref path help needed.
« Reply #12 on: November 29, 2005, 12:44:36 PM »
Have you looked into exploiting the projectname variable?
Engineering Technologist CAD Automation Practitioner
Automation ▸ Design ▸ Drafting ▸ Document Control ▸ Client
cadanalyst@gmail.com http://cadanalyst.slack.com http://linkedin.com/in/cadanalyst

T.Willey

  • Needs a day job
  • Posts: 5251
Re: Xref path help needed.
« Reply #13 on: November 29, 2005, 12:49:50 PM »
Tim

I don't want to ' end-up ', I want to ' become '. - Me

Please think about donating if this post helped you.

Jeff_M

  • King Gator
  • Posts: 4094
  • C3D user & customizer
Re: Xref path help needed.
« Reply #14 on: November 29, 2005, 01:46:10 PM »
Hudster, I have a VBA program I wrote that copies entire folders and repaths the xrefs to match their new locations. I have stripped it down to just the repath portion and I'm pretty sure it will do what you need. However, I have NOT tested it in it's current state! If you want to try it out, please do so on some test folders first. I have hard coded the old & new path prefixes as stated in your first post (just added glasgow\ to the path of x:\dwg\) If you select a parent folder that has many subfolders it may take a while to run as it will dig through all subfolders.

Anyway, it's attached for anyone to play with.......

Update.....I forgot to add the ObjectDBX type library reference. You must add it through the Tools/References menu in the VBAIDE prior to running.
« Last Edit: November 29, 2005, 02:24:01 PM by Jeff_M »