GetLayer()

Summary

Gets the name of the current layer, if any.

Syntax

layer_name = GetLayer()

Returns

A string indicating the name of the current layer, or null if there is no current layer.

Notes

  • Any function that accepts a layer name as an argument uses the current layer if the argument is left null.

  • Each map has its own current layer. There are times when no current layer has been set. In that case, GetLayer() returns null.

Example

lyr = GetLayer()
ShowMessage("The current layer is " + lyr)

See Also

Function Summary
CopyLayerSettings() Copies the settings for a layer from one map to another
SetLayer() Sets the current layer
GetLayers() Gets information on the layers in the system and the current layer
GetLayerNames() Gets a list of all layers in the system
GetMapCurrentLayer() Gets the name of the current layer in a map