几何尺寸与公差论坛------致力于产品几何量公差标准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)
-   -   【转帖】crash on oddbmline (http://www.dimcax.com/hust/showthread.php?t=15538)

yang686526 2009-05-04 06:35 PM

【转帖】crash on oddbmline
 
crash on oddbmline
crash on oddbmline
hi,
here is the code that crashes (after coming out of the scope):
code:
{
oddbmlineptr pmline = oddbmline::createobject();
oddbdictionaryptr pdict = pdb->getmlstyledictionaryid().safeopenobject();
oddbmlinestyleptr pmlinestyle = pdict->getat("standard").safeopenobject();
pmline->setstyle(pmlinestyle->objectid());
oddbblocktablerecordptr pblock = m_pdrw->getmodelspaceid().safeopenobject(oddb::kforwrite);
pblock->appendoddbentity(pmline);
}
it seems to crash because of the lack of segments - so is this a dwgdirect specification that the mline must have some segment vertices before being dwgout()-ed?
is there a chance to close an empty mline and fill its data later?
thanks in advance for any help.
regards
chudomir
current implementation of mline's subclose() crashes if the mline has no vertices. this is "non-standard" situation but autocad appears to be happy with it and its recover does not complain.
so i added the fixes for this case to dd. they will be available in maintenance release.
sergey slezkin
thanks!
chudomir


所有的时间均为北京时间。 现在的时间是 12:58 PM.