Get Count
Typically when a user wants to know the number of elements in a shapefile it requires loading it into ArcMap, opening the attribute table and looking at the number of records. The GetCount command will provide the result in a single line of code. The script can be run in immediate mode inside or outside of ArcMap, if run from outside of ArcMap the arcpy module and pathways will need to be established. The results shown in Figure 9 is for the College layer already loaded on the map from the pervious example.
|