In ArcMap Version 10 SP3, custom map elements that do not implement IGraphicsComposite and IEnumElement interfaces crash when their properties are accessed.
Last Published: August 25, 2014No Product Found
Bug ID Number
NIM074919
Submitted
November 3, 2011
Last Modified
June 5, 2024
Applies to
No Product Found
Version found
10.1
Version Fixed
10.1
Status
Fixed
The bug has been fixed. See the Version Fixed and Additional Information, if applicable, for more information.
Workaround
In order to work with SP3, add the IGraphicsComposite and IEnumElement interfaces to the custom element class: Example implementation: #region IGraphicsComposite Members public IEnumElement get_Graphics(IDisplay Display, object Data) { return this; } #endregion #region IEnumElement Members private int enumIndex = 0; public IElement Next() { if (enumIndex == 0) { enumIndex++; IElement element = new PolygonElementClass(); element.Geometry = m_customElement; return element; } throw new COMException("Iterator End", 1); return null; } public void Reset() { enumIndex = 0; } #endregion