// IMap map, IGraphicElements graphicElements GraphicUtil.GetGraphicsContainer(map).DeleteAllElements(); // clear any previous markup _logger.Debug("Add graphic elements to container"); IGraphicsContainer graphicsContainer = GetGraphicsContainer(map); graphicsContainer.Reset(); for (int i = 0; i < graphicElements.Count; i++) { IElement element = graphicElements.get_Element(i) as IElement; _logger.Debug("Adding geometry type: " + element.Geometry.GeometryType.ToString()); graphicsContainer.AddElement(element, 0); } ((IActiveView)map).PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null); ... public static IGraphicsContainer GetGraphicsContainer(IMap map) { return (IGraphicsContainer)map; }
INFO3 End of the graphics drawing. INFO3 Graphic count: 0. INFO3 Beginning of the graphics drawing.
Doesn't partial refresh need to be called twice, once before and once after an "action" ? I'm not sure if that would solve your problem, but it's just something that caught my eye (though I could be mistaken).
You should be calling graphicsContainer.next somewhere in your code.
Or take out this line: graphicsContainer.Reset();