Restricting the list of feature classes returned with a wildcard

By default, the ListFeatureClasses() function will return all of the feature classes in a workspace. You will often want to restrict this list in some way. Three optional parameters can be passed into ListFeatureClasses() to restrict the feature classes returned. All are optional. The first parameter is a wildcard used to restrict the returned list based on some combination of characters. Other parameters that can be used to restrict the list to include a datatype and a feature dataset.

Getting ready

The list of feature classes returned by the ListFeatureClasses() function can be restricted through the use of a wildcard passed in as the first parameter. The wildcard is used to restrict ...

Get Programming ArcGIS 10.1 with Python Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.