Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Batch change x-ref path

8 REPLIES 8
Reply
Message 1 of 9
b-man
1408 Views, 8 Replies

Batch change x-ref path

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, P.E., CFM
ESP Associates
Slave to the AutoCAD Civil 3D Machine
Civil 3D 2020
Win 7 Pro SP 1, 64-bit on HP Elitebook 8770w (8GB Ram)

"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)
8 REPLIES 8
Message 2 of 9
t.willey
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 '.
Message 3 of 9
Anonymous
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.
Message 4 of 9
adywren
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
Message 5 of 9
Anonymous
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
Message 6 of 9
b-man
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, P.E., CFM
ESP Associates
Slave to the AutoCAD Civil 3D Machine
Civil 3D 2020
Win 7 Pro SP 1, 64-bit on HP Elitebook 8770w (8GB Ram)

"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)
Message 7 of 9
Anonymous
in reply to: b-man

I've never had the need to use the utility since I know better than to
change drive letters 😉 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?
Message 8 of 9
docsaintly
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.
Message 9 of 9
b-man
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, P.E., CFM
ESP Associates
Slave to the AutoCAD Civil 3D Machine
Civil 3D 2020
Win 7 Pro SP 1, 64-bit on HP Elitebook 8770w (8GB Ram)

"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)

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost