ActiveLayer Property

The ActiveLayer property returns an active layer. Returns a Layer object. This is a read-only property.

 

Syntax

object.ActiveLayer

 

Example

This example assigns the active layer in a map document to the variable name CurrentLayer.

 

Dim mvApp As Object

Set mvApp = CreateObject("MapViewer.Application")

Set Plot = mvApp.Documents.Add(DocType:=mvDocPlot)

Set MapLayers = Plot.Layers

Set CurrentLayer = MapLayers.ActiveLayer

 

Used by: Layers collection, PlotDocument object