You are here:

AutoCAD/Autocad File Conversion

Advertisement


Question
I was looking for a way to progammitically convert 2004 .dwg files to 2000 .dwg files. We recieve alot of .dwg files from our corporate office but we havent upgraded to AC 2005 yet and were looking for a way to do a conversion on a large amount of files. I am versed in Visual Basic and would like to create a stand alone programm that I can distribute among the workstations so they can convert as needed. The problem is, I cant find the exact code that will save from 1 file version to another. Any help would be appreciated. Thank you.

Answer
Create a batch file that has a similar syntax as below:
FOR %%F IN (*.DWG) DO c:\PROGRA~1\AutoCA~1\acad %%F 20052000
The above syntax can be expressed in a batch file with a name like 20052000.bat (8 characters)



The script file will have something like this:
saveas
2000
(strcat (getvar "dwgprefix")(getvar "dwgname"))
y
exit

and can be named like this:
2005200.scr

Copy the batch file and script file to the folder in which you want to convert the drawings.  Run that batch file from the MSDOS command prompt.

That should do it.
Keep in touch
Bill DeShawn

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill DeShawn

Expertise

I can address all 2-D questions and some 3-D questions. I do programming in AutoLISP if it doesn`t involve solid modeling. I can also address menu customization issues and can help you find answers to questions I can`t answer by taking your question directly to Autodesk via their newsgroups.

Experience

I used to do electronic and mechanical design for a flat panel monitor manufacturer, and now I do architectural drafting for an architect. I did and do AutoLISP and menu customization and take pride in making my lisp routines to do the work exactly the way the client likes them done.

Publications
I had a routine published in CADENCE magazine (no longer in publication and taken over by CADALYST). Some of my routines are published on my website at http://my.sterling.net/~bdeshawn

©2012 About.com, a part of The New York Times Company. All rights reserved.