The DocumentCollection, DocumentCollectionExtension, Document, and Database objects provide access to the AutoCAD® file methods.
System.Convert.ToInt16(Application.GetSystemVariable("DBMOD"))