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

XREF RENAME AND REPATH

1 REPLY 1
Reply
Message 1 of 2
camardi
2427 Views, 1 Reply

XREF RENAME AND REPATH

Guys, first of all i have looked at many posts relating to this and to be brutally honest i cannot get some of these to work at all.

what i would like to do is rename (externally) and repath about 4-8 xrefs in a drawing set of about 100 drawings. 

you may ask why? it is because we are trying to establish a template set of drawings for a civil design office. and when we start a new project, copy over the drawings to the relevant project folder, change the project number, run the script across the drawings and go from there. I've also tried this using the reference manager, but it doesnt work when you change the name of the xrefs (loses association)

basically i know if i could use a lisp i would run it using autoscript or something equal. 

all i need is to figure out the code to change the project number in the xref

for example

current - "xxxx-PN009999-aaa-00-survey.dwg"
change to - "xxxx-PN001234-aaa-00-survey.dwg"

from my research so far, the easiest way is to make a lisp with the following

-rename
b
xxxx-PN009999-aaa-00-survey
xxxx-PN001234-aaa-00-survey
-xref
p
xxxx-PN001234-aaa-00-survey
c:\acad\civil\dummyfolder\xref\

my only problem is it doesnt work for me as i'm a noob. if this is the correct code, do i have to rename the CAD xref files in explorer first? if it isnt the correct code, could somebody please tell me where i'm failing as too be honest it is doing my head in.

1 REPLY 1
Message 2 of 2
miroko
in reply to: camardi

Hei,

 

I would actually do it in reference manager, unless i do not understand something.

 

You can change names of xref files manaully (externally as you say) using some multi-rename tool (many free applications for it) and then use ref manager to repath xrefs inside dwg files.

 

regards

miroko

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

Post to forums  

Autodesk Design & Make Report

”Boost