The New Tab page is a non-drawing based document window that can be used to create and manage drawing files.
Supported platform: Windows only
Supported release(s): AutoCAD 2015 and later
On the New Tab Page, there are neither any drawing views nor drawing database. Hence, a lot of functions and related palettes need to be hidden when switching in to New Tab Page. Again when switching back to your drawing document, we need to restore those functions and related palettes.
AcApDocManagerReactor is used to trace a document create, switch, and destroy state. You can use this class to achieve your request.
For example, if one palette needs to be hidden in New Tab Page, that palette needs to create a reactor class that inherits from AcApDocManagerReactor and check pActivatedDoc in the active document function. If pActivatedDoc is null, it means that the active document is the New Tab Page, which hides the palette in this function. When pActivatedDoc is not null, you need to restore this palette.
The following sample code outlines how to test for the New Tab Page:
void OPMEditorReactor::documentActivated(AcApDocument* pActivatedDoc) { if(pActivatedDoc){ // Add code when drawing is active. } else { // Add code when New Tab Page is active. } }
The New Tab Page is a non-dwg document. If the current active document is a New Tab Page, there are no drawing database and drawing views related to the New Tab Page. Hence, when you implement new code that might be running on the New Tab Page, you should be careful before doing any get and modify current drawing database and drawing view functions.