Is there a EventHandler for deleteing in the OperationTree?
but no reaction!
Go to Solution.
you can register to the delete event of the operation.
first you need to collect all the operations that you want to track. Use the filtering mechnism for that. In order to get all the operation in the study, use the NoTypeFilter, e.g:
TxObjectList list = TxApplication.ActiveDocument.OperationRoot.GetAllDescendants(new TxNoTypeFilter());
and then you should register for the delete event:
foreach (var obj in list)
public void ItemsIsAboutToBeRemoved( object sender, TxObject_DeletedEventArgs rgs)
This event is fired before the actual delete is done, so you can access the "almost" deleted operation and get info about it.
don't forget to unregister this operation from the handler.
Wokrs! Big Thanks!
Watch Replays of Previous Topics