Do you have anywhere I can start my search on finding a python script that autopopulates an attribute field based on feature class name for feature classes contained in the TOC of an MXD or even better, a geodatabase? I can???t seem to get a handle on this and have spent ages in the python forum. My start was something like this :-import arcpy
mxd = arcpy.mapping.MapDocument(r"CURRENT")
fcs = arcpy.ListFeatureClasses(mxd)
fcs.reset()
fc = fcs.Next()
while fc:
arcpy.CalculateField_management (fc, "FILENAME", '"' + fc + '"')
fc = fcs.Next()
print "done