Jump to content

Recommended Posts

Posted

I have a a batch of AutoCAD files, about 20 of them which are saved in 2007 format and need to be converted to 2004 format. I thought cool I will just write a small lisp program to handle this. But unfortunately, this does not work, when the close command is executed it closes down everything.

 

(command "OPEN" "C:/APD/f1.dwg") (command "._SAVEAS" "2004" "Y") (command "._CLOSE")
(command "OPEN" "C:/APD/f2.dwg") (command "._SAVEAS" "2004" "Y") (command "._CLOSE")
(command "OPEN" "C:/APD/f3.dwg") (command "._SAVEAS" "2004" "Y") (command "._CLOSE")
(command "OPEN" "C:/APD/f4.dwg") (command "._SAVEAS" "2004" "Y") (command "._CLOSE")
(command "OPEN" "C:/APD/f5.dwg") (command "._SAVEAS" "2004" "Y") (command "._CLOSE")

I start with a new file that is blank and load and run this from there. The first file in the list get's converted but then the close command shuts down everything, including the new blank file which I started with.

 

I have read many items on this topic and the True View Converter is not an option as I cannot install new software on this computer and waiting on the IT people to get to it will take at least 2 days.

Posted

Why not just temporarily set SDI = 1, and remove the CLOSE altogether, instead opening a drawing, doing the SAVEAS, then open the next?

Posted

You can do this through etransmit.

Posted

etransmit looks like a very good option. I will have to test it out soon. I resolved my problem with a script, but I have this question about the syntax.

 

At first I tried this:

open c:\my_path\drawing1.dwg
saveas 2004  y
close
.
.
.

I repeated this for every file in the directory, all 178 of them. That did not work and kept getting messed up. It did change the first three files but then would crash on the rest. I checked for typos and since I copied and pasted the lines which did not work from the lines which did work I could not ever find what if anything was wrong.

 

I then gave Lee-Mac's script writer tool a try and it came up with this from the information I entered.

_.open "C:\APD\drawing1.dwg" _.saveas 2004 "C:\APD\drawing1.dwg" _Y _.close
.
.
.

This did the trick and it only took about 2 minutes for it to iterate through all 178 files. We tested them with an old 2005 machine and the downward conversion was effective.

Posted

Excellent to hear my old Script Writer is still proving useful! :)

 

One day I'll get around to upgrading that old program...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...