高级会员
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
|
【转帖】problem with saving as dxf r15
problem with saving as dxf r15
problem with saving as dxf r15
hello,
i use dwgdirect 1.13,
i'm having problems with saving attached file as dxf in ver. r15 (oddb::kdhl_1015).
i use following code to open the file:
code:
//oddbdatabaseptr m_pdb;
//cstring filename; source file name
m_pdb = oddbhostappservices::readfile(filename, true, false, oda::ksharedenyno, odpassword());
and then i try to save file using:
code:
//cstring stroutfilename; output file name
m_pdb->writefile( &odwrfilebuf(stroutfilename),
oddb::kdxf, oddb::kdhl_1015, false);
after saving i get an error saying: "was open for write" .
please, advice me, if there is a solution for this problem.
with regards,
przemek sawicki
attached files
both odamfcapp and odcopyexsample save the file to dxf 15.
the reason is in your code between reading and writing the file. it seems you opened some object, modified it and the object was not closed before calling writefile().
probably you have some smart pointer to modified object.
modified object gets closed than the last smart pointer to it goes out of scope or gets zeroed.
sergey slezkin
|