AcDbDatabase *pDb = new AcDbDatabase(Adesk::kFalse);
if ( Acad::eOk == pDb->readDwgFile(szBlockPath) )
{
acdbHostApplicationServices()->workingDatabase()->insert(blockId, szBlockName, pDb, false);
}
delete pDb;
"szBlockPath" is the absolute path of a dwg File. I run the code above in an arx aplication. after this, the dwg file of "szBlockPath" can't be opened again in the cad, the error msg says it has been opened . I want to know whether the code above has lost some code for releasing the dwg from the cad main process memory.
Try calling AcDbDatabase::closeInput(true) to close the file.