Message 1 of 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I had two custom entities.
Entity B stores a soft pointer to entity A.
I override the subErase function of entity B, and hope modify entity A's property when entity B was deleted.
Acad::ErrorStatus EntityB::subErase(Adesk::Boolean pErasing)
{
if (pErasing)
{
if (NULL != m_referenceId)//m_referenceId is soft pointer to EntityA
ModifyEntityA(m_referenceId);
}
else
{
if (NULL != m_referenceId)
{
RevertEntityA(m_referenceId);
}
}
return eOk;
}When entity B was deleted, the entity A modified as expected (state modified).
But when I send ctrl+z to acad, the entity B was appeared, the ReverEntityA function run success, the property of entity A is correct to write into AcDbDwgFiler during call assertWriteEnabled()(state origin). After a while, acad run dwgInFields of entity A, the property return is still state modified not origin.
So how to modify another entity during undo command?
Solved! Go to Solution.