Skip To Content

esri_featurelayer_getattributes (AutoLISP)

A function to return a list of associated lists of all the attributes of all the features of the specified feature layer in the drawing. The list includes an associated list for each feature of the specified feature layer in the drawing. If the field value is provided only the requested field will be returned. If you provide the field value you must also provide a subtype value even if that value is "" to signify the parent feature class.

Syntax

(esri_featurelayer_getattributes flname [subtype][field])

Arguments

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

Example usage

Requests all of the attributes of all the features in the "Shelters" feature layer as a list of associated lists:

(esri_featurelayer_getattributes "Shelters")

Result example usage

Returns a list of associated lists of all the attributes for the three features of the Shelters feature layer in the current drawing:

((("EntityHandle" . "DF4") ("EntityType" . "POINT") ("EditState" . " ") ("objectid" . 467556) ("facilityid" . "174169003609") ("facname" . "ARLENE WELCH ELEMENTARY SCHOOL") ("factype" . " ") ("organiz" . "") ("jurisdict" . "NAPERVILLE") ("pocname" . "") ("pocemail" . "") ("pocphone" . "") ("capacity" . "609") ("hoursoper" . "") ("daysoper" . "") ("accessres" . "") ("opendate" . "1/1/1970 12:00:00 AM") ("closeddate" . "1/1/1970 12:00:00 AM") ("opsstatus" . "") ("lastupdate" . "1/1/1970 12:00:00 AM") ("lasteditor" . "") ("globalid" . "{534C2CCA-B61C-4C03-ACDE-10E741C57F55}") ("sheltstat" . "1") ("sheltcap" . 609) ("sheltcurpop" . 304) ("petfriend" . "No") ("wheelchair" . "No") ("adacomp" . "No")) (("EntityHandle" . "DE5") ("EntityType" . "POINT") ("EditState" . " ") ("objectid" . 467555) ("facilityid" . "174169002656") ("facname" . "OLIVER JULIAN KENDALL ELEM SCHOOL") ("factype" . " ") ("organiz" . "") ("jurisdict" . "NAPERVILLE") ("pocname" . "") ("pocemail" . "") ("pocphone" . "") ("capacity" . "656") ("hoursoper" . "") ("daysoper" . "") ("accessres" . "") ("opendate" . "1/1/1970 12:00:00 AM") ("closeddate" . "1/1/1970 12:00:00 AM") ("opsstatus" . "") ("lastupdate" . "1/1/1970 12:00:00 AM") ("lasteditor" . "") ("globalid" . "{D5C16CC5-EF67-4394-A06D-F129CB71F8ED}") ("sheltstat" . "1") ("sheltcap" . 656) ("sheltcurpop" . 328) ("petfriend" . "No") ("wheelchair" . "No") ("adacomp" . "No")) (("EntityHandle" . "DD6") ("EntityType" . "POINT") ("EditState" . " ") ("objectid" . 467554) ("facilityid" . "174169002093") ("facname" . "CLIFFORD CRONE MIDDLE SCHOOL") ("factype" . " ") ("organiz" . "") ("jurisdict" . "NAPERVILLE") ("pocname" . "") ("pocemail" . "") ("pocphone" . "") ("capacity" . "093") ("hoursoper" . "") ("daysoper" . "") ("accessres" . "") ("opendate" . "1/1/1970 12:00:00 AM") ("closeddate" . "1/1/1970 12:00:00 AM") ("opsstatus" . "") ("lastupdate" . "1/1/1970 12:00:00 AM") ("lasteditor" . "") ("globalid" . "{6A41AF79-17AB-460E-8454-4C897E8FD428}") ("sheltstat" . "1") ("sheltcap" . 93) ("sheltcurpop" . 46) ("petfriend" . "No") ("wheelchair" . "No") ("adacomp" . "No")))

Return values

  • If successful, a list of associated lists of all the attributes of all the features of the specified feature layer in the drawing.
  • If failed, a list is returned 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 returned 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 provided.

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

    The specified feature layer does not exist in the file.

  • (nil ("Error" . "Field not found."))

    The specified field was not found.

  • (nil ("Error" . "Subtype not found."))

    The specified subtype was not found.

See also

esri_attributes_get | Function returns an associated list of the field names and their attribute values of a single feature.