document state is when there are no open drawings in AutoCAD. There
are several important considerations to keep in mind when you are
working with VBA in a zero document state:
The ThisDrawing object is undefined
in a zero document state. Any attempt to use ThisDrawing will result in an error.
Objects that are document dependent are also not defined in a
zero document state. Document dependent objects are those objects
that fall below the Document object in the AutoCAD object model.
Working with nondocument-dependent object, such as the Application
or MenuBar objects, is allowed.
AutoCAD does not have a command line in a zero document state.
Any attempt to access the AutoCAD command line while AutoCAD is in
a zero document state will result in an error.