TheSwamp

Code Red => VB(A) => Topic started by: Co.Mnstr on November 12, 2008, 06:24:35 PM

Title: what's the best logic to collect layer colors and pstyles?
Post by: Co.Mnstr on November 12, 2008, 06:24:35 PM
I'm not sure what is the best logic to change a layers plotstyle according to the color of the layer. The basic way is to ask what the color of each layer is and then tell it what I want the plotstyle to change to. That will requiere, in my case, 255 lines of code. One line for each color. The ideal way is to say all layers with colors 1, or 254, or 10 thru 39, or 240 thru 249, will get plotstyle lightgray. Then all layers with the color 2, or 253, or 40 thru 69, will get plotstyle mediumgray. And so on. I will ultimately have seven plotstyles that I will need to use. Seven lines of code seems more elegant that 255. I'm hoping there is just some logic that I don't see here.

Thanks all,
Alex
Title: Re: what's the best logic to collect layer colors and pstyles?
Post by: Bryco on November 12, 2008, 08:13:44 PM
Select case can do this