gengelbrecht

Creating Manual RasterRenderer in disables Classify button in Layer properties

Discussion created by gengelbrecht on May 12, 2011
Latest reply on Feb 1, 2012 by ethoms
Hey all,

I'm creating a custom Raster Renderer using IRasterRenderer and IRasterClassifyColorRampRenderer. Trouble is when I display the layer on the map, the labels are not coming up as I set them, and the Classify button to modify the renderer does not open a dialog. Curiously I can't change the number of classifications in the drop down as well, it isn't grayed out, it just doesn't save choices.

Here are some relevant code snippets. Any ideas?



                m_classifyRenderer.ClassCount = m_colorCodes.Count + 1
                m_rasterRenderer = CType(m_classifyRenderer, ESRI.ArcGIS.Carto.IRasterRenderer)
                ...
                ...
                        m_FSymbol.Color = m_RGBcolor
                        m_classifyRenderer.Break(0) = m_CurrentMinCellValue
                        m_classifyRenderer.Symbol(0) = CType(m_FSymbol, ESRI.ArcGIS.Display.ISymbol)
                        m_classifyRenderer.Label(0) = m_CurrentMinCellValue.ToString("F2") & " (min) to " & m_colorCodes(0).lvl.ToString("F2")

                        Dim i As Integer
                        For i = 0 To m_colorCodes.Count - 1
                            m_RGBcolor.NullColor = False
                            m_FSymbol.Color = m_RGBcolor
                            m_classifyRenderer.Break(i) = m_colorCodes(i - 1).lvl
                            m_classifyRenderer.Symbol(i) = m_FSymbol
                            m_classifyRenderer.Label(i) = "< " & m_colorCodes(i).lvl.ToString("F2")
                        Next

                m_rasterRenderer.Update()
                m_rasterRenderer.Raster = m_Raster

Thanks in Advance,

George

Outcomes