ObjectARX
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

something wrong with AcdbDatabase::readDWGFile

2 REPLIES 2
Reply
Message 1 of 3
Anonymous
782 Views, 2 Replies

something wrong with AcdbDatabase::readDWGFile

            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.

2 REPLIES 2
Message 2 of 3
owenwengerd
in reply to: Anonymous

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

--
Owen Wengerd
ManuSoft
Message 3 of 3
jeff
in reply to: owenwengerd

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost