Adds a document feature layer definition to the AutoCAD drawing.
Usage:
- If the FEATURE_LAYER_PROPERTIES are omitted, the feature layer will be created without a query filter, and the GEOMTYPE is set to point.
- If the optional parameter LAYERFILTER is included, the layer list is used as the QUERYFILTER.
- If a more sophisticated query filter than a layer list is required, use the separate esri_docfeaturelayer_setquery function.
- If the new feature layer name already exists then the specified name is added, but with an appended number in succession
Syntax
(esri_docfeaturelayer_add flname [featurelayer_properties])
Arguments
- flname | String | required | The new document feature layer name.
- featurelayer_properties | associated list | optional | The feature layer properties.
Associated label Value type Value description Required or optional "GEOMTYPE " String
The geometric type of the new feature layer : {"Polygon", "Point", "Polyline", "Annotation", or "Multipatch"}
optional (Point is the default.)
"LAYERFILTER" String
One or more AutoCAD layer names separated by commas as a single string to define a QUERYFILTER of the new feature class.
Note:
- Default is "*", which is all layers.
- Use the esri_docfeaturelayer_setquery function to create a complex QUERYFILTER.
optional
Example usage
Attempt to add a polyline document feature called ROADS, where the entities that define the feature layer are on the AutoCAD STREETS layer:
(esri_docfeaturelayer_add "ROADS"
(list
(cons "GEOMTYPE" "POLYLINE")
(cons "LAYERFILTER" "STREETS")
))
Result example usage
Adds a polyline document feature called ROADS, where the entities that define the feature layer are on the AutoCAD STREETS layer and returns a list containing the new 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" . "Missing required argument."))
One or more of the required arguments was not supplied.
See Also
(esri_webfeaturelayer_add) | Adds a new web feature layer.
(esri_weblayer_add) | Adds a new web layer: image layer, map image layer or web feature layer.
(esri_docfeaturelayer_setquery) | Defines a document feature layer query filter.