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

lisp to rename paths

27 REPLIES 27
Reply
Message 1 of 28
GavrielKing
851 Views, 27 Replies

lisp to rename paths

Does anyone know of a lisp routine that will automatically open each drawing in a directory and rename any xref paths based on a specified path structure. For example, we have a directory of drawings that have multiple xrefs attached. We have to open each drawing and rename the path from whatever it is, to ..\Backgrd\DrawingName.dwg

I know there is a program called LinxFixer, but the cost is outrageous!

We are constantly getting new drawings from the architect and we have to go through this process every time!

Any suggestions are greatly appreciated.
27 REPLIES 27
Message 21 of 28
GavrielKing
in reply to: GavrielKing

Thank you for trying. I appreciate the effort.
Message 22 of 28
Anonymous
in reply to: GavrielKing

The link for "RelativeXrefs by Joe Burke" is here:

http://discussion.autodesk.com/forums/thread.jspa?threadID=635343

and the file is attached.

--
Humans are born with a wide horizon.
As time goes by, the horizon narrows and
narrows, until it becomes a point of view.


a écrit dans le message de news:
6258213@discussion.autodesk.com...
Thank you. However, I searched the Autodesk forum for "RelativeXrefs by Joe
Burke" and I did not find anything. Where do I search for this?
Message 23 of 28
GavrielKing
in reply to: GavrielKing

Thank you.
Message 24 of 28
GavrielKing
in reply to: GavrielKing

Thank you, but this did not work for me. I opened a new drawing, loaded the lisp routine, typed REX and nothing happened.
Message 25 of 28
ezcad.co.uk
in reply to: GavrielKing

Capture the drawing file names and write them out into a script file. At the end of the function call the script.
The script contents might look like:
[Begin Script]
filedia
0
FileOpen
"F:\Drawings\G85221-U0068-J4-S009_001_0.dwg"
saveas
2004
"F:\Drawings\G85221-U0068-J4-S009_001_0.dwg"
y
FileOpen
"F:\Drawings\G85221-x0035-c0-v002 sht1.dwg"
saveas
2004
"F:\Drawings\G85221-x0035-c0-v002 sht1.dwg"
y
filedia
1
[End Script]

I have used this technique before and it works OK if you are careful in your assembly of the script.

HTH

Steve
Message 26 of 28
GavrielKing
in reply to: GavrielKing

Thank you for the input, but why don't you use DWG True View to convert multiple drawings to another version? Also, I am looking for a one-step process to re-path multiple drawings within a directory, and then end up with the drawings saved based on either what the settings are set to in AutoCAD or a specified version withint the lisp routine - automatically without having to specify each individual filename, because the filenames are always different from project to project. But, thanks, again, for the input.
Message 27 of 28
ezcad.co.uk
in reply to: GavrielKing

You are missing the point here.
Get your lisp function to build the script as it is handling each drawing, writing the drawing name to the script. Run the script programatically. One click operation. No need to involve another application at all.

Steve
Message 28 of 28
GavrielKing
in reply to: GavrielKing

I see. But I am not at all versed well enough to be able to write the lisp that will re-path the xrefs, let alone know how to build the script to write each filename into the script.

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

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report