The esri_webfeaturelayer_set function updates the properties of the specified web feature layer in the drawing.
Syntax
(esri_webfeaturelayer_set flname subtype service_properties)
Arguments
- flname | string | required | An existing web feature layer name in the drawing.
- subtype | string | optional | An existing subtype name defined for the feature layer, or empty string, "", for all subtypes or if there are no subtypes.
- service_properties | associated list | required | An associated list of web feature layer properties as dotted pairs as defined in the following table:
Associated label Value type Value description Required or optional "BRANCH" String
The name of the affected editing branch.
optional
"CADLAYER" String
The name of the AutoCAD layer that will be used to override the default layer name when tracking features of a web feature layer.
optional
"DEFINITIONEXPRESSION" String
A WHERE clause expression to limit features from the layer by attribute values. The syntax of the WHERE clause is determined by the source data.
optional
"DESCRIPTION" String
The block name if the type is {Block Reference}, or a description if the type is {"AECC_COGO_POINT"}.
optional
"EDITMODE" Integer
The editing option. The options are {1=edit, 0=no edit}.
optional
"SUBLAYER_FIELD"
String
A field name used to define sublayers. Enter an empty string, "", to clear all sublayers, which will delete existing sublayers and move all features to the parent layer. This does not result in any modifications to the feature geometries or attributes. Sublayers must be cleared before setting a sublayer field. Customizing sublayers is not supported on layers that have a service-defined subtype field.
optional
"SAVEASTEMPLATE" String
The valid value is {"Local"}, which denotes local storage in the drawing.
optional
"TYPE" String
The default element type of {"POINT"}, {"Block Reference"}, or {"AECC_COGO_POINT"}.
optional
Example usage 1
Set the web feature layer editing properties for the editor01.sampleBranch branch of the Damage_to_Commercial_Buildings web feature layer to read-only.(esri_webfeaturelayer_set "Damage_to_Commercial_Buildings" ""
(list
(cons "EDITMODE" 0)
(cons "BRANCH" "editor01.sampleBranch")
)
)
Result example usage 1
Set the web feature layer editing properties for the editor01.sampleBranch branch of the Damage_to_Commercial_Buildings web feature layer to read-only, and return a list of true.
(T)Example usage 2
Set the default AutoCAD layer name to track features of the Commercial subtype of the Olympia_Meters web
feature layer to the AutoCAD layer AB-METERS-EX to override the default layer.(esri_webfeaturelayer_set "Olympia_Meters" "Commercial"
(list
(cons "CADLAYER" "AB-METERS-EX")
)
)
Result example usage
Set the web feature layer editing properties for the Commercial subtype of the Olympia_Meters web feature layer to an editing mode of read-only and return a list of true.
(T)Return values
- If successful, the function returns a list of true: (T).
- If failed, 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."))
One or more of the required arguments was not supplied.
- (nil ("Error". "Feature layer not found."))
The specified web feature layer value is not a valid web feature layer in the drawing.
- (nil ("Error". "Sublayer not found."))
The specified sublayer was not found in the feature layer.
- (nil ("Error" . "Cannot set a type field on a sublayer.")
The type field cannot be set on a sublayer.
- (nil ("Error" . "Web feature layer does not support editing.")
You may be trying to adjust EDITMODE on a web feature layer that doesn't support editing.