几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量

几何尺寸与公差论坛------致力于产品几何量公差标准GD&T (GDT:ASME)|New GPS(ISO)研究/CAD设计/CAM加工/CMM测量 (http://www.dimcax.com/hust/index.php)
-   DirectDWG (http://www.dimcax.com/hust/forumdisplay.php?f=89)
-   -   【转帖】exception when calling writefile (http://www.dimcax.com/hust/showthread.php?t=16156)

yang686526 2009-05-05 10:01 AM

【转帖】exception when calling writefile
 
exception when calling writefile
exception when calling writefile
code:

oddbdatabaseptr dboutput = m_pdb->wblock();
{
odstreambufptr pout = odmemorystream::createnew();
dboutput->writefile( pout, m_saveastype, oddb::vac15);
}
{
dboutput->writefile(_t("c:\\test.dwg"), m_saveastype, oddb::vac15, theapp.getsavepreview());
}hi,
this code, with the database in attachment, generate an exception during the second call of writefile.
i can't find why this exception is thrown.
i try to delete all the entities of the drawing but it doesn't change anything.
if i change the saveas dwgversion to oddb::vac21, it works, but we want to save it as oddb::vac15.
best regards,
froggy.
attached files
i couldn't reproduce that in 2.5.1.
i assumed that m_saveastype = oddb::kdwg, and theapp.getsavepreview() is true.
vladimir


所有的时间均为北京时间。 现在的时间是 01:15 AM.