DWG (denoted by the .dwg filename extension) was the native file format for the Interact CAD package, developed by Mike Riddle in the late 1970s, and subsequently licensed by Autodesk in 1982 as the basis for AutoCAD. From 1982 to 2007, Autodesk created versions of AutoCAD which wrote no less than 18 major variants of the DWG file format, none of which are publicly documented.
The DWG format is probably the most widely used format for CAD drawings. Autodesk estimates that in 1998 there were in excess of two billion DWG files in existence.
There are several claims to control of the DWG format. It is Autodesk who designs, defines, and iterates the DWG format as the native format for their CAD applications. Autodesk sells a read/write library, called RealDWG, under selective licensing terms for use in non-competitive applications. Several companies. have attempted to reverse engineer Autodesk's DWG format, and offer software libraries to read and write Autodesk DWG files. The most successful is Open Design Alliance, a non-profit consortium created in 1998 by a number of software developers (including competitors to Autodesk), released a read/write/view library called the OpenDWG Toolkit, which was based on the MarComp AUTODIRECT libraries. (ODA has since rewritten and updated that code.) There are no open-source DWG libraries currently available, and neither RealDWG nor DWGdirect are licensed on terms that are compatible with the or similar.
In 1998, Autodesk added file verification to AutoCAD R14.01, through a function called DWGCHECK. This function was supported by an encrypted checksum and product code (called a "watermark" by Autodesk), written into DWG files created by the program. In 2006, in response to Autodesk users experiencing bugs and incompatibilities in files written by reverse-engineered DWG read/write libraries, Autodesk modified AutoCAD 2007, to include "TrustedDWG technology", a function which would embed a text string within DWG files written by the program: "Autodesk DWG. This file is a Trusted DWG last saved by an Autodesk application or Autodesk licensed application." This helped Autodesk software users ensure that the files they were opening were created by an Autodesk, or RealDWG application, reducing risk of incompatibilities. AutoCAD would pop up a message, warning of potential stability problems, if a user opened a 2007 version DWG file which did not include this text string.
In 2008 The Free Software Foundation asserted the need for an open replacement for the DWG format by placing 'Replacement for OpenDWG libraries' in 9th place on their High Priority Free Software Projects list.
In 2008 Autodesk and Bentley agreed on exchange of software libraries, including Autodesk RealDWG, to improve the ability to read and write the companies' respective DWG and DGN formats in mixed environments with greater fidelity. In addition, the two companies will facilitate work process interoperability between their AEC applications through supporting the reciprocal use of available Application Programming Interfaces.