PDA

View Full Version : saveas with a script



clovis
2006-09-27, 08:24 AM
Hello,
I'd like to find out how to save a dwg as mecanical 6 from the prompt
with filedia set to 0
command: saveas "Autocad Mecanical 6" but the string is not available at the prompt. Strange enough It is possible to do so with filedia set to 1, but again not with a script .
Any idea?
Thanks

DarrenYoung
2006-10-04, 12:36 PM
If you just do a SAVE, it will default to the mechanical format. This won't get you a different file name unless the drawing is "unsaved".

SAVEAS will only allow AutoCAD versions, not Mechanical (from the command line).

You could do a SAVEAS (new name - Acad format), followed by a SAVE (same name - AcadM format), but you could loose some of the Mechanical info in the SAVEAS.

There's also an AMSAVEASACADM2004 command that's available in AcadM 2006.

In AcadM 2007, there's an AMSAVEASACADM2004 and AMSAVEASACADM2006 commands. You might be able to SAVEAS with one of those, dropping the mechanical file back a version to get a Mechanical DWG and a new file name. I'm not sure if a SAVE at that point would bring it back to the current Mechanical format or leave it in the previous format. I'm also not sure if saving as an older version like that supports round tripping of the newer versions specific info so you may/may not loose mechanical data in the process. You'll just have to try and see.

DarrenYoung
2006-10-11, 02:19 PM
Actually, I had someone w/Autodesk check with development and if you select the most recent version (2006 in ACADM2006 / 2007 in ACADM2007), the saveas command from the command line will save the file in Mechanical format despite the command line not indicating this.

From my testing after getting this info, this is correct. Just give it a try.

clovis
2007-06-21, 03:25 PM
Thanks for your help