AnsweredAssumed Answered

How to get number of features in shapefile from python?

Question asked by jimbattle on Jan 30, 2011
Latest reply on Jan 31, 2011 by jimbattle
Hi. I've been messing around with the python command window.

I can't figure out which property will tell me how many features are in my shapefile.

points = 'C:\ArcGIS_Tutorial\Vectormap\points.shp'

I looked at arcpy.describe but it's not what I am after.

If I can figure out how many features are in a shapefile, or how many datasets in a folder etc, it will be easy to create some for routines to process each one.

But until I find that property I am a bit stumped. Any tips on how to retrieve the answer in Python?

I know the answer is 10,000 from the attribute table - I created a 100 by 100 grid of regular points in a shapefile using Hawth's Tools. But I want to get that info programatically.