02 December 2016

Understanding DWG Files and Fixing Them

The native AutoCAD file for saving drawings is ".DWG" (short form extension for "drawing"). The DWG file can be likened to a moveable database, storing tables of information such as geometry, views, layers, configurations, third-party extensions and links to other data sets like XREF or BLOCK. The first .DWG binary format "MC0.0" was implemented in 1982 with the AutoCAD 1.0 release. A user can check any DWG file directly by opening in a binary-text editor (I use vi/vim) and checking the first six characters like we did here:

That's it. Those six characters "hard-code" the rest of the drawings data as to which version protocol it obeys. in this case the file is DWG 2010 format. How do we know? Because AC1024 is code for 2010 DWG. Many of you have probably seen this table somewhere before:

DWG Version "Internal" Version Release Date AutoCAD version(s)
DWG R1.0 MC0.0 April 1983 AutoCAD Release 1.0
DWG R1.2 AC1.2 August  1983 AutoCAD Release 1.2
DWG R1.40 AC1.40 October 1983 AutoCAD Release 1.40
DWG R2.05 AC1.50 October 1984 AutoCAD Release 2.05
DWG R2.10 AC2.10 May 1985 AutoCAD Release 2.10
DWG R2.21 AC2.21 June 1986 AutoCAD Release 2.21
DWG R2.22 AC1001, AC2.22   AutoCAD Release 2.22
DWG R2.50 AC1002 June 1986 AutoCAD Release 2.50
DWG R2.60 AC1003 April 1987 AutoCAD Release 2.60
DWG R9 AC1004 September 1987 AutoCAD Release 9
DWG R10 AC1006 October 1988 AutoCAD Release 10
DWG R11/12 AC1009 October 1990 AutoCAD Release 11 & 12
DWG R13 AC1012 November 1994 AutoCAD Release 13
DWG R14 AC1014 May 1997 AutoCAD Release 14
DWG 2000 AC1015 March 1999 AutoCAD 2000 - AutoCAD 2002
DWG 2004 AC1018 March 2003 AutoCAD 2004 - AutoCAD 2006
DWG 2007 AC1021 March 2006 AutoCAD 2007 - AutoCAD 2009
DWG 2010 AC1024 March 2009 AutoCAD 2010 - AutoCAD 2012
DWG 2013 AC1027 March 2012 AutoCAD 2013 - AutoCAD 2017

AutoCAD configurations can be divided into two groups: global software "Options" and drawing-specific "Settings". The Autodesk DWG files spec includes numerous configuration settings that get stored into the individual DWG file. One way of implementing certain drawing settings across all new drawings is to save those settings into the Drawing Template FIle (".DWT"). With progeCAD 2017, the default .DWT folder is:
%APPDATA%\PSOFT\progeCAD x64\R17\Professional - English\Templates
But the path can be configured in Options -> "Path/Files" tab -> Templates

DWG like many high-precision CAD formats can accumulate erros over time. These errors can originate from geometry, block handling, API errors and many other sources. DWG errors can result in degraded (slow/"glitched") performance, stability issues and even crash incidents.

progeCAD, like AutoCAD, offers several tools for addressing DWG data errors. Main among these tools is the AUDIT command:

Regardless of the drawing origin, when system stability begins to degrade, always check the DWG quality using these tools. Occasional discussions on the CADDIT forum address these incidents directly with a number of good suggestions:

progeCAD offers comprehensive DWG drawing and editing at a fraction of the cost of AutoCAD, as shown above offering similar tools and completely compatible format. For a free progeCAD download visit CADDIT here (link).

No comments: