Skip To Content

esri_maplayer_set (AutoLISP)

Modifies the properties of an existing map or image layer in the drawing with the specified SERVICE_PROPERTIES.

Syntax

(esri_maplayer_set maplayerid [service_properties])

Arguments

  • maplayerid | integer | required | The index integer number associated with the layer that can be obtained using (esri_maplayers).
  • service_properties | associated list | optional | An associated list of map or image layer properties as dotted pairs.

    Associated labelValue typeValue descriptionRequired or optional
    "DYNAMIC"

    integer

    Method of updating the map service when the view changes: {T = Dynamic behavior, nil = Refresh on demand}

    optional

    "VISIBILITY"

    integer

    Change the visibility of the map: {T = Visible, nil = Hidden}

    optional

    "TRANSPARENCY"

    integer

    Percentage of image transparency to apply to the map: {0-99: zero is opaque} (default = 30)

    optional

Example usage

Modify map number 1 to be visible and draw on demand with a transparency of 45%.

(esri_maplayer_set 1
  (list
  (cons "DYNAMIC" nil)
  (cons "TRANSPARENCY" 45)
  (cons "VISIBILITY" T)
))

Result example usage

Updates the map layer properties 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" . "Missing required argument."))

    The required argument was not supplied.

  • (nil ("Error" . "No item selected"))

    Specified map layer not found.