import arcpy max = 5 infile = r"e:\test\test.shp" for i in range(1,max+1): fname = "Field_"+str(i) arcpy.AddField_management(infile, fname, "DOUBLE") #starts with "Field_1", ends with "Field_5"
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.