Author Topic: Rename and Repath for Xrefs  (Read 4438 times)

0 Members and 1 Guest are viewing this topic.

dpenney

  • Guest
Rename and Repath for Xrefs
« on: August 09, 2013, 07:47:19 PM »
Based on a problem we found today regarding Copy Design of drawings in Vault Professional....

I thought I had a decent workaround (see attached), however it didn't work.

The plan involved (in Vault) the auto-renumbering a folder of drawing files to suit the new project, which involved the re-pathing and renaming of the drawings master xrefs (because Vault wont accept identical file-names for good reason).

The Vault part of the process worked reasonably well, and although I didn't seem to get any error messages, however I could not seem to be able to make XRef manager work to suit new Xref name and Path, and a lisp I had come across didn't seem to work quite right as it didn't actually rename any of the 'replacement' Xrefs on checking the (already checked out from Vault) drawings on C drive.

I double checked the "Old Path"..."New Path" and the "Old Name"...."New name"....and they seemed fine?

Note: These drawing are all checked out of Vault and are on C Drive Vault Folder.....

Old Paths/New path:
"c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref"
"c:\\Vault\\Designs\\012 - ARR\\0500\\GA" "c:\\Vault\\Designs\\STD - Project\\0100\\GA"

Old Xrefs/New Xrefs:
"XREF ARR Site Plan.dwg" "XREF GEN Site Plan.dwg"
"012-0500-AG-0004.dwg" "STD-0100-AG-0004.dwg"
"012-0500-AG-0006.dwg" "STD-0100-AG-0006.dwg"

Anybody had any luck with this method in a lisp? Or does anyone know of a working 3rd party tool for achieving this re-path/rename of an identical Xref?

Any suggestions would be appreciated.

Cheers

DP

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Rename and Repath for Xrefs
« Reply #1 on: August 09, 2013, 08:19:17 PM »
Perhaps something here will be of use to you.
Repath xref

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.

dpenney

  • Guest
Re: Rename and Repath for Xrefs
« Reply #2 on: August 10, 2013, 06:52:29 AM »
Perhaps something here will be of use to you.
Repath xref
Most deal with just repathing, but not the name of the new xref, that worked anyway.

Was very time consuming trying most of them out too.  :-o

I was hoping for a point in the right direction of actually working lisps, that repath to the new (but identical xref)  that have been copied renamed and repathed.

These I could then tweak and spend the time trying to get to work....   :wink:

Anybody got pointers to proven lisps that I can tweak to suit my requirements (still on learners permit here)

Cheers.

DP

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Rename and Repath for Xrefs
« Reply #3 on: August 10, 2013, 09:39:26 AM »
Does this work?
(command "_.-xref" "_path" < Xref Name > < New Path >)

How about this thread?
http://www.theswamp.org/index.php?topic=35761.0
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.

dpenney

  • Guest
Re: Rename and Repath for Xrefs
« Reply #4 on: August 10, 2013, 09:59:19 AM »
Does this work?
(command "_.-xref" "_path" < Xref Name > < New Path >)

How about this thread?
http://www.theswamp.org/index.php?topic=35761.0

Umm, do I put the new path in New Path and the new Xref name of the drawing in Xref Name? Like this? If so it didn't work....either as

(command "_.-xref" "_path" < XREF GEN Site Plan.dwg > < C:\Vault\Designs\STD - PROJECT\0100 - CDP\AG\XREF DRG >)

or as

(command "_.-xref" "_path" < XREF GEN Site Plan.dwg > < C:\\Vault\\Designs\STD - PROJECT\\0100 - CDP\\AG\\XREF DRG >)

In the meantime I will check out the link.

I must admit, I never knew - what must be quite a common occurrence - would be so difficult.

Many thanks for your input, much appreciated.

DP
« Last Edit: August 10, 2013, 10:15:05 AM by dpenney »

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Rename and Repath for Xrefs
« Reply #5 on: August 10, 2013, 10:48:30 AM »
I would try this:
(command "_.-xref" "c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref ARR Site Plan.dwg" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref GEN Site Plan.dwg" )
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.

dpenney

  • Guest
Re: Rename and Repath for Xrefs
« Reply #6 on: August 10, 2013, 12:01:55 PM »
I would try this:
(command "_.-xref" "c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref ARR Site Plan.dwg" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref GEN Site Plan.dwg" )

Now comes up like this......However, where did the sad face icon come from???   :-o
What was supposed to happen, was it expecting further input from me?

Command: (command "_.-xref" "c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref ARR Site Plan.dwg" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref GEN Site Plan.dwg" )
_.-xref
Enter an option [?/Bind/Detach/Path/pathType/Unload/Reload/Overlay/Attach] <Attach>: c:\Vault\Designs\012 - ARR\0500\GA\Xref ARR Site Plan.dwg
Invalid option keyword.

...Reload xref terminated!!! :(

owenwengerd

  • Bull Frog
  • Posts: 451
Re: Rename and Repath for Xrefs
« Reply #7 on: August 10, 2013, 01:44:38 PM »
AutoCAD is expecting an option keyword, and you are feeding it a path. I think you should be able to work out on your own what the problem is.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
Re: Rename and Repath for Xrefs
« Reply #8 on: August 10, 2013, 04:33:31 PM »
Yep! forgot this:
(command "_.-xref" "_path" "c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref ARR Site Plan.dwg" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref GEN Site Plan.dwg" )
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.

dpenney

  • Guest
Re: Rename and Repath for Xrefs
« Reply #9 on: August 10, 2013, 07:46:07 PM »
Yep! forgot this:
(command "_.-xref" "_path" "c:\\Vault\\Designs\\012 - ARR\\0500\\GA\\Xref ARR Site Plan.dwg" "c:\\Vault\\Designs\\STD - Project\\0100\\GA\\Xref GEN Site Plan.dwg" )

From the real command....I get this:

Command: (command "_.-xref" "_path" "C:\\Vault\\Designs\\012 - ARR\\0500 - PDS 1\\AG\\XREF DRG\\Xref ARR Site Plan.dwg" "C:\\Vault\\Designs\\STD - PROJECT\\0100 - CDP\\AG\\XREF DRG\\Xref GEN Site Plan.dwg" )
_.-xref
Enter an option [?/Bind/Detach/Path/pathType/Unload/Reload/Overlay/Attach] <Attach>: _path
Edit xref name(s) to edit path: C:\Vault\Designs\012 - ARR\0500 - PDS 1\AG\XREF DRG\Xref ARR Site Plan.dwg
No matching xref names found.

Command: C:\Vault\Designs\STD - PROJECT\0100 - CDP\AG\XREF DRG\Xref GEN Site Plan.dwg Unknown command "DWG".  Press F1 for help.

The Xrefs do indeed exist as per screenshots....
« Last Edit: August 10, 2013, 07:54:53 PM by dpenney »

dpenney

  • Guest
Re: Rename and Repath for Xrefs
« Reply #10 on: August 11, 2013, 12:34:58 AM »
Update....

EDIT: Someone (Jeff_M) kindly gave this a once over for me and realised that the Xref drawings were showing the
".dwg" extension! Whereas in the XR Manager, this is not the case.

Upon removing the .dwg extensions, AND putting the FULL drawing path WITH the extensions in, it worked!  :lmao:

The changed 'working lisp' is attached.....

Many thanks Jeff_M for the pointer in the right direction and anyone else that may have helped me...and after 50 hours of trials, tribulations and testing and rewrites of various lisps, I can finally put my feet up and enjoy the remainder of my weekend!

Edit 2: After a few tests, I have noticed it is making paths Absolute. Any way to update this lisp and make paths Relative?

Cheers All.   :-D

DP
« Last Edit: August 11, 2013, 04:24:39 AM by dpenney »