Setting the Current Document without Activating It

There are several features that implicitly operate on the current document, which may be different from the active document. You can use the function AcApDocManager::setCurDocument() with the activate parameter set to kFalse to make the current document and active document different. The features for which this is necessary include:

When the active and current documents are different, all user input functions and members concerning the document, such as the graphics screen, will be disabled. This includes functions for both ObjectARX and ActiveX applications.

Whenever you set the current document without also activating it, the setCurDocument() caller should restore the current document to be the same as the active document when finished. However, if this is not done by the time that the next input event is processed, the current document will be switched back to the active document.