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.
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 the contents of your list based on a name. For example, you may want to return only a list of feature classes that start with the letter B
. To accomplish this, you use a combination of an asterisk with any number of characters. The following code...