Select to view content in your preferred language

ArcPy ListFeatureClasses

748
1
05-30-2016 02:00 AM
Status: Closed
Labels (1)
AnjaSeckel
Regular Contributor

The ArcPy - function "ListFeatureClasses" saves the list of features in a specific coding. E.g.:

fc = ['uRoadL', ...]

ListFeatureClasses—ArcPy Functions | ArcGIS for Desktop

Some tools, e.g. Calculate Visual Specification" can't work with such list. The coding of the list must be changed before. That is why it would be helpfull if the programmer of the python-script could choose the coding with an additional parameter.

Tags (2)
1 Comment
ShaunWalbridge
Status changed to: Closed

Thank you for your suggestion. Most Geoprocessing tools operate on individual layers, and applying a geoprocessing tool to multiple inputs can be accommodated in Python by iterating over the list, e.g.

for layer in arcpy.ListFeatureClasses("input/path"):
    arcpy.Buffer(layer, ...)

Excepting for a subset of tools where working on multiple inputs is common, this is the default pattern used in Python to work against multiple inputs.

Cheers, Shaun