Skip To Content

esri_featurelayer_getquery (AutoLISP)

Returns an associated list of query filter properties for the specified feature layer.

This is a new option that consolidates older versions of esri_featurelayer_getquery and esri_docfeaturelayer_getquery in one function. It returns the QUERYFILTER of an existing web or document feature layer as an associated list representing a query related to the feature layer.

Syntax

(esri_featurelayer_getquery flname [subtype])

Arguments

  • flname | string | required | An existing feature layer name in the drawing.
  • subtype | string | optional | An existing feature layer subtype name in the drawing.

Example usage 1

Attempt to get the filter query properties for the Shelters feature layer as an associated list:

(esri_featurelayer_getquery "Shelters")

Result example usage 1

Returns the filter query properties for the Shelters feature layer as an associated list which consists of the DXF™ code for layer 8 and a comma separated string of AutoCAD layer names for the parent features and subtypes:

((8 . "ESRI_Shelters,ESRI_Shelters_4,ESRI_Shelters_2,ESRI_Shelters_3,ESRI_Shelters_1,ESRI_Shelters_5,ESRI_Shelters_6"))

Example usage 2

Attempt to get the filter query properties for the Shelters_2 subtype of the Shelters feature layer as an associated list

(esri_featurelayer_getquery "Shelters" "Shelters_2")

Result example usage 2

Returns the filter query properties for the Shelters_2 subtype of the Shelters feature layer as an associated list which consists of the DXF™ code for layer 8 and the AutoCAD layer name ESRI_Shelters_2:

((8 . "ESRI_Shelters_2"))

Return values

  • If successful, returns an associated list representing the query used to define the feature layer. The associated list contains DXF™ codes as key values and an associated value that combine to create a filtering query for the feature layer.
  • 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" . "Feature layer not found."))

    The specified feature layer value is not a valid feature layer in the drawing.