zaloudek

Can I use VB to Reverse Sorting?

Discussion created by zaloudek on Jul 1, 2010
I'm using an IRasterClassifyColorRampRenderer to render a raster.  Everything works, except that I'd like the highest vales to be at the top of the legend instead of the bottom.   I can manally fix this by using 'Reverse Sorting' in the Symbology tab of the raster's layer properties, but I'd like to be able to do it programatically with VB.  I've tried changing the SortValuesAscending property to false, but all it seems to do it reverse the colors, not the values.

What's weird to me is that I had the same issue with a different raster in the same mxd.  I was able to get those values reversed by reversing the loop I was using (i.e., my index value 'i' started at 16 and went to 0, instead of the other way around).  I tried the same thing with my current raster, and that doesn't work.  Help!

I can post my code too, if that will help.  Thanks!

Outcomes