Skip To Content

esri_maplayer_remove (AutoLISP)

Esri_maplayer_remove removes the specified map or imagery layer referenced by its map index number. Use the esri_maplayers function to get a list of map layers and their maplayerid values.

Syntax

(esri_maplayer_remove maplayerid)

Arguments

  • maplayerid | integer | required | The index integer number associated with the layer that can be obtained using (esri_maplayers).

Example usage

Attempt to remove the map reference in the drawing for the index number 1 map layer.

(esri_maplayer_remove 1)

Result example usage

Removes the the map layer from the drawing and returns a list of true:

(T)

Return values

This function returns a value.

  • If successful returns a list of true: (T)
  • If failed, it returns a list with the first value of nil; then an associated list is returned 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 item selected"))

    Specified map layer not found.