Skip To Content

esri_docfeaturelayer_copy (AutoLISP)

Copies an existing document feature layer definition to the specified name or a unique name in the current drawing. If the supplied new feature layer name, newflname, already exists or is omitted, a new unique name is generated. The resulting new feature layer has the same feature layer query and attribute definitions. No entities are copied.

Syntax

(esri_docfeaturelayer_copy flname new_flname)

Arguments

  • flname | string | required | An existing document feature layer name in the drawing.
  • new_flname | string | required | The new document feature layer name for the copied feature layer definition.

Example usage

Attempt to create a copy of the Streets document feature layer definition with the new name Roads:

(esri_docfeaturelayer_copy "Streets" "Roads")

Result example usage

Creates a copy of the Streets document feature layer called Roads and returns a list with the new document feature layer name:

("Roads")

Return values

  • If successful, returns a list containing the new document feature layer name.
  • 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" . "Feature layer not found."))

    The specified document feature layer was not found within the drawing.

See Also

(esri_docfeaturelayer_rename) | Renames a document feature layer.