I have a geodatabase that contains some stand-alone feature classes, and many feature datasets filled with more feature classes.
The GDB was created long ago without anyone to properly manage it, and there are many feature classes for which the OID field is named ObjectID_1, ObjectID_2, etc. Correcting this is a bridge I'll cross much later.
Each feature class contains a field called "ObjectID", whether it's the true OID field or not.
I want to identify all feature classes that have an OID field not called "OBJECTID". The method I was using was to make a list of all feature classes in the GDB, and then:
for f in fclist:
desc = arcpy.Describe(sdeConn + os.sep + f)
foid = desc.OIDFieldName
if foid == "OBJECTID":
fclist.remove(f)
This should remove all feature classes for which the OID field is named "OBJECTID", correct? Well, it removes some, but not all of those feature classes.
Thoughts and suggestions?
Thanks.