查看单个帖子
旧 2009-05-04, 06:35 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】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
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)