Skip To Content

esri_webfeaturelayer_changeBranch (AutoLISP)

The esri_webfeaturelayer_changeBranch function changes the branch version for the specified web feature layer. Branch versions may be displayed as locked in the Esri Contents user interface if the published service is set to read-only, or if the branch version was unable to be edited at the time it was added. If it's not specifically designated as a read-only layer, the branch version layer can be switched to the unlocked editing state in the context menu of the Esri Contents user interface. It still requires a user with the appropriate credentials to be signed in to synchronize changes.

Syntax

(esri_webfeaturelayer_changeBranch flname branchName)

Arguments

The following arguments are included:

  • flname | string | required | An existing web feature layer name in the drawing.
  • branchName | string | required | An existing branch name to be used for the current branch version.

Example usage

Change the branch version of the landowners layer to the editor01.phase1 branch version.

(esri_webfeaturelayer_changeBranch "landowners" "editor01.phase1")

Result example usage

The current branch version of the landowners layer is changed to the editor01.phase1 branch version, and returns a list of true :

(T)

Return values

The following are the possible return values:

  • If successful, the function returns a list of true: (T).
  • If failed, it returns a list with the first value of nil and 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 was not supplied.

  • (nil ("Error" . "Branch version not found."))

    The branch version name was not found.

  • (nil ("Error" . "Layer does not support branch versions")

    The layer does not support branch versions.

  • (nil ("Error" . "No connected web feature layers found."))

    No connected web feature layers were found.

See also

(esri_webfeaturelayer_branchInfo)—Get the web feature layer branch version information for the specified web feature layer as an associated list.

(esri_webfeaturelayer_createBranch)—Create a web feature layer branch version for the specified web feature layer.

(esri_webfeaturelayer_branchNames)—Retrieve a list of branch version names from the server.

(esri_webfeaturelayer_deleteBranch)—Delete a branch version from the specified web feature layer.

(esri_webfeaturelayer_createBranch)—Create a web feature layer branch version for the specified web feature layer.