Martin, I like your stepping up and down through the layer list. I will put this into a function, and thematic layer control will much less onerous.
Thanks Mike In a message dated 1/22/03 6:54:12 PM Pacific Standard Time, [EMAIL PROTECTED] writes: > The approach is: > 1. Get the layer number that the next thematic layer will become. > 2. Add the thematic layer > 3. Get the layer name of the layer number calculated in step 1. > > You now have the layer name and number of the most recently added thematic > layer. > > The key step is #1, which I implemented as follows: > > ' Need to get the layer number that the next thematic layer will become > ' This simply equals 1 unless: > ' i) another thematic layer already exists for this layer and/or > ' ii) another normal layer above this layer > > nLayer = 1 > For i = 1 to MapperInfo(FrontWindow(), MAPPER_INFO_LAYERS) > If LayerInfo(FrontWindow(), i, LAYER_INFO_NAME) = <base_layer> then > For j = i-1 to 1 step -1 > If LayerInfo(FrontWindow(), j, LAYER_INFO_TYPE) = LAYER_INFO_TYPE_NORMAL > then > nLayer = i > Exit For > End If > Next > Exit For > End If > Next > > > > Cheers, > Martin --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 5119
