ArcPad Scripting Object Model
MoveToTop Method
See Also  Example  Send comments on this topic.
Index
Required. A Variant that specifies the name or index of the layer.
Layers Collection : MoveToTop Method

Glossary Item Box

Description

Moves the layer at the specifed position to the top of the layer drawing order. That is, the layer will be drawn last.

Syntax

object.MoveToTop ( Index )

Parameters

Index
Required. A Variant that specifies the name or index of the layer.

Remarks

Index is a variant specifying the layer to move to the top of the layer drawing order. It can be either the index or the name of the layer. For example, if your map contains a layer named "Soildata.shp" that has an index of 2, the following two lines of code will yield the same result:

       Application.Map.Layers.MoveToTop(2)
       Application.Map.Layers.MoveToTop("Soildata.shp")
After calling the MoveToTop method, the re-ordering of the layers will be reflected in the Layers dialog box.

Example

Rearranges the drawing order of the layers in the sample San Diego ArcPad.apm included with ArcPad.
MoveTo Example (VBScript)Copy Code
Sub RearrangeSDLayers
    Map.Layers.MoveToTop "Roads"
    Map.Layers.MoveToBottom "Aerial Photo"
    Map.Layers.MoveTo 4,2
End Sub

See Also

© 2013 All Rights Reserved.