Create, Open, Save, and Close Drawings (.NET)

The DocumentCollection, DocumentCollectionExtension, Document, and Database objects provide access to the AutoCAD® file methods.

Tip: The DBMOD system variable can be used to determine if the current drawing has been changed.
System.Convert.ToInt16(Application.GetSystemVariable("DBMOD"))