something wrong with AcdbDatabase::readDWGFile

something wrong with AcdbDatabase::readDWGFile

Anonymous
Not applicable
1,026 Views
2 Replies
Message 1 of 3

something wrong with AcdbDatabase::readDWGFile

Anonymous
Not applicable

            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.

0 Likes
1,027 Views
2 Replies
Replies (2)
Message 2 of 3

owenwengerd
Advisor
Advisor

Try calling AcDbDatabase::closeInput(true) to close the file.

--
Owen Wengerd
ManuSoft
0 Likes
Message 3 of 3

jeff
Collaborator
Collaborator

Just starting to get into ObjectARX but have done some coding with .NET api but could preserveSourceDatabase  being false be cause the problem?

You can also find your answers @ TheSwamp
0 Likes