CAD Forum - tips, tricks, discussion and utilities for AutoCAD, Inventor, Revit and other Autodesk products []
CZ | EN | DE
Login or
  Visitors: 6092

CAD tip CAD tip # 6439:

Question CAD 
 %  platform  category 
Q - question

Forcing DWG format version for save in AutoCAD.

A - answer AutoCAD allows to save DWG drawing files also in older versions of the DWG format. This setting for the DWG format can be done in the Options dialog, on the "Open and Save" tab.

With the following less-known trick you can force an older save format also from a menu macro, from a LISP utility or through a site-wide setting in the Registry (e.g. using GPO, logon script, etc.).

The default save format in AutoCAD is controlled by the environment variable "DefaultFormatForSave". This value is stored in the Registry - e.g.:

HKEY_CURRENT_USER\Software\Autodesk\AutoCAD\R17.2\ACAD-7001:409\Profiles\<< Unnamed profile >>\General

and you can set it with the function (setenv).

This variable can be set to the following values:

  • 64 - AutoCAD 2018 DWG format
  • 60 - AutoCAD 2013 DWG format
  • 48 - AutoCAD 2010 DWG format
  • 36 - AutoCAD 2007 DWG format
  • 24 - AutoCAD 2004 DWG format
  • 12 - AutoCAD 2000 DWG format
So e.g. the function (setenv "DefaultFormatForSave" "24") will set the default save format in AutoCAD 2009 to DWG2004. In AutoCAD LT, use the _SETENV command.

Other possible values for DefaultFormatForSave are e.g. 1=R12 DXF, 13=2000 DXF, 49=2010 DXF, 50=2010 DWT, 61=2013 DXF, 62=2013 DWT, 65=2018 DXF, 66=2018 DWT

Alternatively, you can preset the Save/SaveAs format using the following LISP code (format codes see above):

(setq acadobj (vla-get-application (vlax-get-acad-object))
      acadoptions (vla-get-preferences acadobj)
      acadopensave (vla-get-opensave acadoptions)
      acadsaveastype (vla-get-saveastype acadopensave)
(vla-put-saveastype acadopensave 60)

Note: these settings do not apply to DWG export commands, e.g. EXPORTTOAUTOCAD, EXPORTC3DDRAWING, etc. - these have to be setup directly in their options, e.g.:

100% Win,MacOS  CAD 
17.12.2008    36725×  

See also:
Tip 13868:XrefStamp - create a dynamic list of xrefs in your DWG drawing.
Tip 13513:How to quickly record a video from a CAD application or other Windows program? (replacing Screencast)
Tip 12663:How to transfer my project from Infraworks to Revit?
Tip 12069:Unicode and DXF files.
Tip 11972:How to convert a Tinkercad 3D model to a DWG file?

Back   All CAD Tips

Have we helped you? If you want to support the CAD Forum web service, consider buying one of our CAD applications, or our custom software development offerings, or donating via PayPal (see above). You may also add a link to your web - like this "fan" link: CAD Forum - tips, utilities, blocks for Autodesk products
CAD:    OS:    Categ: 
Text:  FAQ glossary   

Save your floating licenses (NLS) consumed by inactive users - free unused licenses with
LogOff 2006 More info

Please use these tips at your own risk.
Arkance Systems is not responsible for possible problems that may occur as a result of using any of these tips.