Message 1 of 13
Open DWG with ARX in MDI
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Using AutoCAD ObjectARX: 2023 , C++
trying to open a DWG file in MDI mode using below code :
Acad::ErrorStatus es = Acad::eOk;
if (acDocManager->isApplicationContext())
{
es = acDocManager->appContextOpenDocument(strDrawingFile);
}
But appContextOpenDocument() fails with error Acad::eFilerError.
Opening the same DWG file in SDI mode using below API is successful :
Acad::ErrorStatus es = acedSyncFileOpen(strDrawingFile);
Please suggest how to resolve error while opening DWG file in MDI mode.
The command is registered with commandFlag as "ACRX_CMD_MODAL | ACRX_CMD_SESSION".
Also tried with executeInApplicationContext() in case when command is not registered with ACRX_CMD_SESSION.