Hi all
I am getting this error when I try to process a specific Feature Class
for fc in fcList:
print "Feature: " + fc
#
# Process Process Feature Class X
if fc == 'SpecificFeatureClass':
.......
This is what I did and it works.
for fc in fcList: print "Feature: " + fc
# # # Process Sewer Access Manhone # desc = arcpy.Describe(fc) fname = desc.Name print "Feature Name: " + fname if fname == "SpecificFeatureClass":
Please post your entire non-working script and error message. There does not appear to be an error in what you've posted. For example, this works:
>>> arcpy.env.workspace = r'C:/junk' ... fcList = arcpy.ListFeatureClasses() ... for fc in fcList: ... if fc == 'utms.shp': ... print fc ... # returns utms.shp
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.