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