How to get the range of the Object Id's for a feature class?

628
2
01-25-2013 02:32 AM
pavan_kumarmuttigi
New Contributor
Hi,

Can any one suggest me some way to get the range of the Object Id's present with the Feature Class(that is the total number of Object Id's present starting from some value and ended with some value).

Thanks in Advance.
0 Kudos
2 Replies
NeilClemmons
Regular Contributor III
The way that will always work is to query for all of the features, loop through them and look for the min and max values.  You can also use IDatastatistics.  Depending on the datasource, you could use a standard SQL query to get the min and max.  Keep in mind though that the OIDs may not be sequential.  There could be gaps caused by deleting features and other operations. A feature class could have a feature with OID 1 and another feature with OID 1000 and only have 2 features in it.
0 Kudos
pavan_kumarmuttigi
New Contributor
Hi Neil Clemmons,

Thank you for your support and Information.

Thanks once again.
0 Kudos