To participate in undo in AutoCAD, databases must be associated with a document, because each document has an independent undo stack. However, this feature is in direct conflict with the need to load databases whose contents are intended to be shared across document edit sessions. In other words, you must decide between the following two scenarios for your side databases:
In ObjectARX, the former scenario is the default. Whenever a new instance of AcDbDatabase is instantiated, it is associated with the current document. This is one of the reasons an application needs to change the current document without activating the new document.
The AcDbDatabase class provides the following function, which disables the database undo and disassociates the database from the document:
void disableUndoRecording( bool disable);
Any AcDb reliance on any document-specific system variables will assume the built-in defaults for document-independent databases. Also, there is no need to lock any documents to access document-independent databases.