Skip To Content

esri_featurelayer_selectspecial (AutoLISP)

The esri_featurelayer_selectspecial function returns an AutoCAD selection set from a specified feature layer based on a special criteria. This function is useful for quality assurance and compliance checking before synchronizing web feature layers or to find entities based on various editing and data states when working with feature layers.

The special search criteria include the following:

  • FlaggedAsModifiedAutoCAD entities that qualify as features of the specified web feature layer and that have their editing state flagged as modified.
  • FlaggedAsNewAutoCAD entities that qualify as features of the specified web feature layer and that have their editing state flagged as a new feature.
  • IncorrectGeometryAutoCAD entities that would qualify as features because of the AutoCAD layer they reside on but that are not considered features because they are of the wrong geometric type. An example is polylines that are drawn on an AutoCAD layer of ArcGIS point features.
  • OutsideProjectAreaAutoCAD entities that qualify as features of the specified feature layer and that are outside the current project area boundary.
  • ProxyObjectPresentAutoCAD proxy entities that are used to represent custom object geometry, such as COGO points outside AutoCAD Civil 3D, or when no object enabler is present.
  • UnclosedPolylinesAutoCAD polyline entities that would qualify as polygon features but the polyline closed flag is not set on the entity.
Note:

Attempting to manage a large number of selection sets simultaneously is not recommended. An application cannot have more than 128 selection sets open at once. (The limit may be lower on your system.) When the limit is reached, AutoCAD will not create more selection sets. Keep a minimum number of sets open at a time, and set unneeded selection sets to nil as soon as possible. If the maximum number of selection sets is reached, you cannot create more.

Syntax

(esri_featurelayer_selectspecial flname select_settings)

Arguments

  • flname | string | required | An existing web feature layer or document feature layer name in the drawing.
  • select_settings | associated list | required | An associated list of select settings.

Associated labelValue typeValue descriptionRequired or optional
"CRITERIA"

string

The search criteria. Valid values are "UnclosedPolyline" and "IncorrectGeometry", "ProxyObjectPresent".

Web feature layer only options are "FlaggedAsModified" , "FlaggedAsNew", and "OutsideProjectArea".

Required

"SUBTYPE"

string

The subtype name as a string. Use empty string "" to include all subtypes.

Optional

Example usage 1

Create a selection set of all the entities that belong to the shelters feature layer that are outside the project area of the current drawing:

(esri_featurelayer_selectspecial "shelters"
  (list (cons "CRITERIA" "OutsideProjectArea"))
)

Result example usage 1

A selection set of all the entities that belong to the shelters feature layer that are outside the project area of the current drawing:

<Selection set: 9f>

Example usage 2

Create a selection set all of the entities that belong to the Public subtype of the Roads web feature layer that are considered by ArcGIS for AutoCAD to have been modified before synchronizing in the current drawing:

(esri_featurelayer_selectspecial "Roads"
 (list (cons "CRITERIA" "FlaggedAsModified")(cons "Subtype" "Public"))
)

Result example usage 2

Returns a selection set of all the entities that belong to the Public subtype of the Roads web feature layer that are considered by ArcGIS for AutoCAD to have been modified before synchronizing in the current drawing:

<Selection set: d0>

Return values

The following are the possible return values:

  • If successful, returns an AutoCAD selection set object.
  • If failed, 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."))

    One or more of the required arguments was not supplied.

  • (nil ("Error" . "Feature layer not found."))

    The required feature layer value is not valid or is missing.

  • (nil ("Error" . "Subtype name does not exist."))

    The required subtype name is not valid or is missing.

See also

esri_featurelayer_select