Skip To Content

esri_featurelayer_remove (AutoLISP)

This function consolidates the esri_docfeaturelayer_remove and esri_webfeaturelayer_remove functions into one function. This function will remove the layer definition from the drawing, or in the case of a web feature layer, both the layer definition and its entities from the drawing. This function will also abandon any edits for a specified web feature layer that have not been synchronized.

Syntax

(esri_featurelayer_remove flname)

Arguments

  • flname | string | required | An existing web feature layer or document feature layer name in the drawing.

Example usage 1

Attempt to remove the Shelters web feature layer connection and entities from the current drawing:

(esri_featurelayer_remove "Shelters")

Result example usage 1

Removes the web feature layer and its entities and returns a list of true:

(T)

Example usage 2

Attempt to remove the Streets document feature layer definition from the current drawing:

(esri_featurelayer_remove "Streets")

Result example usage 2

Removes the definition of the Streets document feature layer from the drawing, all entities remain unchanged, and returns a list of true:

(T)

Return values

  • If successful, returns a list of true: (T)
  • 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" . "Missing required argument."))

    The required argument is not supplied.

  • (nil ("Error" . "Feature layer not found."))

    The specified feature layer value is not a valid feature layer in the drawing.

See also

esri_docfeaturelayer_remove | Removes a document feature layer definition from the current drawing.

esri_webfeaturelayer_remove | Removes a web feature layer definition from the current drawing.