|
发表于 2022-7-6 23:29:51
|
显示全部楼层
Welcome to CADTutor.
I don't code in ARX personally, but speaking conceptually; depending on which version & .NET Framework you're using, one option is to register ObjectModified Event handlers, and filter for ObjectId(s) of Type, XData, etc. and use the CommandCancelled, CommandEnded, or CommandFailed, etc. to restore the original Object Properties (or the Object itself) accordingly.
You might also look into the Veto() Method depending on the specific situation, or conditions of the Command being invoked; otherwise, consider the Close() Method via ObjectOverrule.
Cheers
[Edit] - I just checked the DevBlog link, and see now that Viru created a new EraseOverrule Type that inherits from ObjectOverrule. |
|