Preventing AutoCAD from entering a zero doc state Published date: 2005-03-04 ID: TS46546 Applies to: AutoCAD® 2005 Issue How do I prevent AutoCAD from entering a zero document state? Solution When AutoCAD is in a zero document state, you have very limited access to AutoCAD's functionality. In addtion, there are additional complications. One straightforward method of solving this problem is to prevent AutoCAD from entering the zero document state. You can plant an AcApDocManagerReactor and override documentToBeDestroyed(), and call AcApDocManager::appContextNewDocument{}. But this combination will not work because using document manipulation functions within a reactor callback is unsafe. You cannot determine what state AutoCAD is in. A workaround, is to install a timer. Make a reasonable estimate about how long it will take AutoCAD to close a drawing, then set the timer accordingly. Within the timer callback function, you can safely create a new drawing.The fol...