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?

4

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

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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