This function returns the total number of features of a feature layer within the drawing. Use this function to count how many document or web feature layer features of the specified feature layer are within the drawing.
Syntax
(esri_featurelayer_featurecount flname [subtype])
Arguments
- flname | string | required | An existing document or web feature layer name defined in the drawing.
- subtype | string | optional | An existing feature layer subtype name in the drawing.
Example usage 1
Request the number of features of the Shelters feature layer are currently within the drawing.
(esri_featurelayer_featurecount "Shelters")
Result example usage 1
Returns the number of features in the Shelters feature layer currently within the drawing as an integer.
15
Example usage 2
Request the number of features of the Shelters feature layer that are currently within the drawing.
(esri_featurelayer_featurecount "shelters" "Open")
Result example usage 2
Returns the number of features in the Shelters feature layer with the Open subtype currently within the drawing as an integer.
11
Return values
- If successful, returns a list of feature layer names.
- 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."))
Feature layer specified was not found within the drawing.
- (nil ("Error" . "Missing required argument"))
The required feature layer name was not specified.