Skip To Content

esri_maplayers (AutoLISP)

This function returns an indexed associated list of map and imagery layer names included in the current drawing. The associated value is an index number used to identify the layer as well as the indexed value which is the name of layer as a string. The index number is used in other AutoLISP functions like (esri_maplayer_extract) to identify a map or image layer.

Syntax

(esri_maplayers)

Arguments

None.

Example usage

Queries the drawing for an associated list of map and image layers present in the drawing:

(esri_maplayers)

Result example usage

Returns an associated list of map and image layers present in the drawing with index numbers and names as a strings:

((1 . "World Street Map") (2 . "Sea Surface Temperature (°C)") (3 . "Seafloor Dissolved Oxygen (ml/l)") (4 . "HYCOM - Ocean Current Vectors"))

Return values

  • If successful, returns an associated list of indexed map layers.
  • If failed, returns a list with the first value of nil and then an associated list containing the key value "Error" and an associated error message as a string: (nil ( "Error" . "<message>"))

Failed return values

A failed return value can occur for any of the following reasons:

  • (nil ("Error" . "No layers."))

    No layers were found in the drawing.

    .