laptop and a wrench

Bug

‘IViewRefresh.RefreshItem’ method throws error “ArgumentException ("Value does not fall within the expected range.")” while refreshing the bounds of newly added graphic element to the graphics container

Last Published: August 31, 2014 ArcGIS Engine
Bug ID Number NIM076230
SubmittedDecember 14, 2011
Last ModifiedJune 5, 2024
Applies toArcGIS Engine
Version found10.0
Program languageC#
Operating SystemWindows OS
Operating System Version7 64 Bit
StatusWill Not Be Addressed

Additional Information

We apologize that we were unable to address this issue within the current product support cycle. If the issue continues to affect your work in a supported release, please contact Technical Support.

Workaround

1. Comment the following lines of code in the application:((IViewRefresh)axMapControl1.ActiveView).RefreshItem(Element);And uncomment the below lines of code:((IViewRefresh)axMapControl1.ActiveView).PartialRefreshShape(esriViewDrawPhase.esriViewGraphics, Element, Element.Geometry, 1); 2. Run the application in debug mode.3. Use the ‘New polygon’ element tool to draw a new polygon on the map. 4. The ElementAdded event is then fired, and the code will execute successfully.

Steps to Reproduce

Bug ID: NIM076230

Software:

  • ArcGIS Engine

Get notified when the status of a bug changes

Download the Esri Support App

Discover more on this topic

Get help from ArcGIS experts

Contact technical support

Download the Esri Support App

Go to download options