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
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); }– DarrenCommented Sep 12, 2011 at 13:59