Search code examples
c#objectarx

Selection changed tracking in AutoCad


In my project I need to track changes in entities' selection and change the selection set in a way I need(something like filtering). I add delegate to Document.ImpliedSelectionChanged where I check selection changes:

Editor.SelectImplied().Value

, but it works while I not press Escape key. After pressing Escape the event is not triggered any more.

I need not a selected subentites set to be tracked, so Editor.SelectionAdded and Editor.SelectionRemoved events can't help me too.

So question is: how to watch for changes of current selection in AutoCad document using C# ObjectArx framework?


Solution

  • The problem was in a handler added by another programmer, and when the handler threw an exception(and this exception was hidden by AutoCAD, so it couldn't be caught and debugged-_-) all other handlers where dropped, because of it.