Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Active Contributor
b-man
Posts: 32
Registered: ‎11-08-2008
Message 1 of 9 (359 Views)

Batch change x-ref path

359 Views, 8 Replies
02-03-2010 01:32 PM
Our company is in the process of re-organizing our server structure (yeah... ughh....). One of the items on the table is adjusting the root directory our drawing files resides in. One of the issues we are leery of is the number of drawings (literally thousands) that contain xref paths of "h:\landprojects\blah\blah\blah" which would need to be changed to "q:\projects\blah\blah\blah", for example.

Is there a batch program or script out there that can change a portion of the root of an x-ref path (i know relative pathing for the past however many years would have helped avoid this issue, but that ship sailed too long ago) on an entire directory worth of drawings without having to individually open drawings?

Thanks in advance for your help.
Andrew Martin
ESP Associates
HP Elitebook Workstation
Windows 7

"The only thing worse than training your employees and having them leave is not training them and having them stay" - Henry Ford (a fairly successful businessman)
Mentor
t.willey
Posts: 2,504
Registered: ‎02-17-2004
Message 2 of 9 (359 Views)

Re: Batch change x-ref path

02-03-2010 01:41 PM in reply to: b-man
You can use the program at this location
[ http://www.theswamp.org/index.php?topic=22517.0 ]

Look for the latest one, as that is the one that has the find an replace feature for name and/or path of xrefs. You can either compile the source code for it, or you can load the dll. Some people don't trust dll compiled by others, as they can be viruses within them, that is why the source code is there. You load it by the command ' netload '.
*Jason Piercey
Message 3 of 9 (359 Views)

Re: Batch change x-ref path

02-03-2010 01:43 PM in reply to: b-man
The Reference Manager is a stand-alone product that can
be found on the start menu at the same location as your
AutoCAD product. It is designed for this type of thing.

wrote in message news:6329849@discussion.autodesk.com...
Our company is in the process of re-organizing our server structure (yeah... ughh....). One of the items on the table is adjusting
the root directory our drawing files resides in. One of the issues we are leery of is the number of drawings (literally thousands)
that contain xref paths of "h:\landprojects\blah\blah\blah" which would need to be changed to "q:\projects\blah\blah\blah", for
example.

Is there a batch program or script out there that can change a portion of the root of an x-ref path (i know relative pathing for the
past however many years would have helped avoid this issue, but that ship sailed too long ago) on an entire directory worth of
drawings without having to individually open drawings?

Thanks in advance for your help.
Active Member
adywren5211
Posts: 9
Registered: ‎06-26-2009
Message 4 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 05:58 AM in reply to: b-man
Did you get sorted?..

We have exactly the same issue... any guidance on how to tackle it would be appreciated

Ady
*Jason Piercey
Message 5 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 08:15 AM in reply to: b-man
Did you read my reply?

wrote in message news:6343968@discussion.autodesk.com...
Did you get sorted?..

We have exactly the same issue... any guidance on how to tackle it would be appreciated

Ady
Active Contributor
b-man
Posts: 32
Registered: ‎11-08-2008
Message 6 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 12:09 PM in reply to: b-man
I did read and tried Jason's reply. It appears to be useful for a small set of drawings. To attempt it on even a single folder of sheets crashed it, so to use it on an entire drawing directory containing several gigs of drawings seems unlikely to work. Perhaps I did something wrong, Jason. Have you had success using that tool on large sets of drawings?

I am still searching for another solution, though.
Andrew Martin
ESP Associates
HP Elitebook Workstation
Windows 7

"The only thing worse than training your employees and having them leave is not training them and having them stay" - Henry Ford (a fairly successful businessman)
*Jason Piercey
Message 7 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 12:15 PM in reply to: b-man
I've never had the need to use the utility since I know better than to
change drive letters :smileywink: I just know that is what the utility is designed
to do. If it crashes, then I guess it wasn't developed very well.

wrote in message news:6344448@discussion.autodesk.com...
> Have you had success using that tool on large sets of drawings?
Distinguished Contributor
docsaintly
Posts: 196
Registered: ‎12-06-2006
Message 8 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 12:27 PM in reply to: b-man
Heh, I just got done writing my post about how to rename xrefs and saw yours right below it.

To handle multiple drawings, get your hands on a batching utility. There is one that comes with AutoCAD tools (ScriptPro), and there are some paid ones out there. Using this, you can write a script or lisp and have it run on multiple files.

http://discussion.autodesk.com/forums/thread.jspa?threadID=754646&tstart=0 <- This is the link to my thread. I've written some lisp commands that will rename an xref name. This assumes you are using relative pathing but could be modified.

I understand that you are not using relative paths at this time, but have you considered that you will have to touch every drawing anyway so you might as well change the paths to relative now? It is much easier to change a support file path than it is to change a few thousand drawing's path.
Active Contributor
b-man
Posts: 32
Registered: ‎11-08-2008
Message 9 of 9 (359 Views)

Re: Batch change x-ref path

02-25-2010 12:30 PM in reply to: b-man
Yes - the wisdom of experience in this case is fouled by the lack of foresight by previous administrators.
Andrew Martin
ESP Associates
HP Elitebook Workstation
Windows 7

"The only thing worse than training your employees and having them leave is not training them and having them stay" - Henry Ford (a fairly successful businessman)
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Need installation help?

Start with some of our most frequented solutions or visit the Installation and Licensing Forum to get help installing your software.