The purpose of the script is to count the number of single family homes within each "FireBoxMap" feature class. When I specify a single feature class in line 10 the script runs fine. When I change the feature class to "FireBoxMap*" to run through all of the feature classes it does not populate the desired information. I am not sure what I am doing wrong.
Solved! Go to Solution.
The question is already answered, but I will write a bit more detail to hopefully help you understand:
You have a "For" Loop, but inside the loop you only have the lines of code:
# Add two fields to hold the results
arcpy.AddField_management (fc, "SFCount", "LONG")
arcpy.AddField_management (fc, "MFCOUNT", "LONG")
The rest of the code is not indented, so does not get included in the loop!
So your script currently works as follows:
For each FC:
add fields to FC
On the last FC in the loop only:
selection + calculate
To fix, simply indent all code after your "For" loop