exception class oderror_fileexception
exception class oderror_fileexception
i am using borland c++ builder 6 and a project modeled after exservices. i am writing using m_pdb->writefile(fb, oddb::kdwg, oddb::vac18, false);
txt.shx is not found (it is not on my system)
odbasefilebuf:

pen() is throwing the exception which systemservices::accessfile() should catch.
i have overridden getpreferablefont() and getsubstitutefont() for my hostappservices class, but neither function is called.
there isn't even any text in the file i am trying to write, so i don't know why txt.shx would be needed.
any ideas?
call stack:
odbasefilebuf:

pen
odrdfilebuf:

pen
odrdfilebuf:

pen
systemservices::createfile
systemservices::accessfile
dbhostappservices::findfile
odfiledependencymanagerimpl::updatepath
odfiledependencymanagerimpl::countentries
oddwgr18filewriter::createsectiondic
oddwgr18filewriter::writedatabase
oddbdatabase::writefile
save
you may safely ignore this call
your findfile sould return false, if there is no txt.shx.
it is asked for, because in default database, there is always some default text style (usually referring to txt.shx). text style creates file dependency, and while saving file, dependencies are updated.
vladimir
ok, but...
ok, i gues the first four exceptions are expected, but any clues on the others:
1. oderror_fileexception - odrdfilebuf

en
2. oderror_fileexception - odrdfilebuf

en
3. oderror_fileexception - odrdfilebuf

en
4. oderror_fileexception - odrdfilebuf

en
5. oderror_wasopenforwrite - oddwgr18filewriter::wrobjects
6. oderror - save
7. oderror - oddbdatabase::release
8. external exception eefface
a dwg file is created, but it is only 2k, and autocad says it is invalid.
if oddwgr18filewriter::wrobjects throws oderror_wasopenforwrite, it means that some object was open for write and not closed, before saving database.
vladimir
quote:
originally posted by wvk
if oddwgr18filewriter::wrobjects throws oderror_wasopenforwrite, it means that some object was open for write and not closed, before saving database.
is there some way i can ensure that all objects are closed before writing occurs?
all objects that i have opened should be out of context when i write to file (at least i can't find any that are still in context), and yet it still produces this error.
thanks,
chuck