I need a lisp for changing xref names and repath the xref locations.

I need a lisp for changing xref names and repath the xref locations.

sivarajann
Contributor Contributor
1,336 Views
1 Reply
Message 1 of 2

I need a lisp for changing xref names and repath the xref locations.

sivarajann
Contributor
Contributor

Hi everyone,

I need a lisp for changing xref name and path, but for changing xref path lisp will ask is it required or not.

 

Option-1)
{ for changing xref names like below.
eg.

 old name - "60533441-REF-00-0000_G_A1-Title.dwg"
 New name - "60533441-REF-V0-0000_G_A1-Title.dwg"
 Here the change only "00" become "V0", but this change need all the xrefs attached in the drawing sheet.
 }

   OR

Option-2)
 {
 for changing xref names like below.
 eg.
 old name - "60533441-REF-00-0000_G_A1-Title.dwg"
 New name - "60533441-REF-V0-0100_G_A1-Title.dwg"
 Here the change is "00-0000" will be "V0-0100", but it was in the all xref attached in the drawing sheet.
 }

 

For Option-1 & Option-2)

Note-1 : if the name can change by user defined option , like user can enter the old & new names then old name will be find & replaced by new name.

Note-2 : if the xref name is different than this name, like "Utility Rainbow,SEC & Marker.dwg" ignore that xref. Because it not starting with the name "60533441-REF-00-0000").

 

For Option-1 & Option-2)

For xref path, lisp need to ask us, is it required to change or not. if answer is yes all reference file path will be change to one location.

eg.

old path - "C:\Users\sivarajann\Desktop\Projects\DOC\cad\60533441-REF-00-0000_G_A1-Title.dwg"

New path - "C:\Users\sivarajann\Desktop\Projects\DOC\cad\........\60533441-REF-V0-0100_G_A1-Title.dwg"

Lisp has to ask the new path for changing all the xref path.

 

 

If anyone have good options please include it.

 

Expecting a good result

thanks everyone

0 Likes
1,337 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable

I see that you requested a lisp, but if you do not need it for integrating into an existing workflow I suggest to utilize the Reference Manager.

 

You can add all the files containing xref's and perform a find/replace on the reference file paths.

0 Likes