查看单个帖子
旧 2009-05-07, 05:37 PM   #1
yang686526
高级会员
 
注册日期: 06-11
帖子: 14579
精华: 1
现金: 224494 标准币
资产: 234494 标准币
yang686526 向着好的方向发展
默认 【转帖】undoredo

undo/redo
undo/redo
just one question about undo and redo.
does it works with oddbblockreference ?
if we call startundorecord() before appendoddbentity(), it doesn't work, after it does !
undo/redo should work. could you describe the situation with more details?
sergey slezkin
here the code:
void codamfcappdoc:ninsertoddbblocreference()
{
startundorecord();
oddbdatabaseptr pdb;
oddbblocktablerecordptr pblock = getmodelspaceid().safeopenobject(oddb::kforwrite);
pdb = theapp.readfile(_t("e:\\ac11050.dwg")); // does not depend of the drawing
oddbobjectid newblockid1;
newblockid1 = insert(_t("a4_v"), pdb);
pdb.release();
oddbblockreferenceptr pblkref = oddbblockreference::createobject();
pblkref->setposition(odgepoint3d(0, 0, 0));
pblkref->setblocktablerecord(newblockid1);
pblock->appendoddbentity(pblkref);
updateallviews(null);
}
if i call undo, it works but redo doesn't.
the oddbblockreference is reappended, the oddbblocktablerecord is also reappended, but none of the entities of the oddbblocktablerecord is reappended, i can only see blockbegin and blockend of the oddbblocktablerecord in odamfcapp.
thanks for detailed description. this is dd bug for that particular case. we'll fix it asap.
sergey slezkin
yang686526离线中   回复时引用此帖
GDT自动化论坛(仅游客可见)