Dear All,
I've Tried to Add Field using arcpy library but the application always close when I run the code, is there any ideas about this situation?
Thank you
Here is my code:
import arcpy, os, glob, pythonaddins
mxd = arcpy.mapping.MapDocument("Current")
mxd.author = "Me"
arcpy.env.workspace = "CURRENT"
mxd.save()
df = arcpy.mapping.ListDataFrames(mxd)[0]
for fc in df:
arcpy.AddField_management(fc,"Name","TEXT",field_length=50 )