Skip To Content

esri_webfeaturelayer_createBranch (AutoLISP)

The esri_webfeaturelayer_createBranch function creates a web feature layer branch version for the specified web feature layer.

Syntax

(esri_webfeaturelayer_createBranch flname branchName branchInfo)

Arguments

  • flname | string | required | An existing web feature layer name in the drawing.
  • branchName | string | required | A name that will be used for the new branch version.
  • branchInfo | Associated list | required | Branch version information that will be applied to the flname web feature layer as an associated list of dotted pairs as follows:

Associated labelValue typeValue descriptionRequired or optional
"DESCRIPTION"

string

Description text provided by the creator of the branch version with a limit of 64 characters.

Optional

"ACCESS"

string

The access level of the branch version. The options are "Public", "Private", and "Protected".

Required

Example usage

Attempt to create a new branch version named SouthwestProposal for the Damage_to_Commercial_Buildings web feature layer.

(esri_webfeaturelayer_createBranch "Damage_to_Commercial_Buildings" "SouthwestProposal" 
    (list
        (cons "DESCRIPTION" "proposed changes") 
        (cons "ACCESS" "Public")
    )
)

Result example usage

Creates a new branch version named SouthwestProposal for the Damage_to_Commercial_Buildings web feature layer and returns the branch name:

("SouthwestProposal")

Return values

The following are the possible return values:

  • If successful, the function returns a list containing the branch version name as a string.
  • 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" . "Service error encountered."))

    An issue occurred when connecting to the web service.

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

    The specified layer does not support branch versions.

  • (nil ("Error" . "Unable to retrieve properties from the branch version.")

    Invalid values were used or some other connection error occurred.

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

    The network connection to the web feature layer was lost.

  • (nil ("Error" . " Failed.")

    The branch name may already exist.