3

I am trying to make use of the built-in ArcObjects drawing tools (ie ControlsNewCircleTool) - but I need to listen for the events so I can add the drawing graphics to the database in our application. Is there an event or way to listen for when the user has drawn a new graphic and also modified it?

1 Answer 1

4

Try wiring IGraphicsContainerEvents to IMap.ActiveGraphicsLayer and listen for ElementAdded and ElementUpdated.

1
  • thanks Kirk! activeGraphicsLayer = (CompositeGraphicsLayer)mapControl.ActiveView.FocusMap.ActiveGraphicsLayer; IGraphicsContainerEvents_Event containerEvents = (IGraphicsContainerEvents_Event)activeGraphicsLayer; containerEvents.ElementAdded +=new IGraphicsContainerEvents_ElementAddedEventHandler(containerEvents_ElementAdded); }
    – Darren
    Commented Sep 12, 2011 at 13:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.