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

yang686526 2009-05-07 05:37 PM

【转帖】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::oninsertoddbblocreference()
{
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


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