I'm a novice programmer and I would like to ask for something which will facilitate my work. I need to rename all the field names in some shapefiles I am working on and since renaming is an arduous task, I need to automate using some scripting. Renaming a shapefile field name is not possible so I used geodatabase. Now, the 'Alter Field' tool is limited to only one field name at a time, can somebody help me with the script I need? Below is the example.
Example:
arcpy.AlterField_management(r'D:\Workspace\11-30-2014\Approved GDB\Nisma_GIS DATA\2NISMA_WETCO.gdb\NISMA_WETCO\CHAMBER2', 'LOCATION_I', 'LOCATION_ID', 'LOCATION_ID')
How can I include these: ('X_COORD', 'X_COORDINATE', 'X_COORDINATE', 'Y_COORD' , 'Y_COORDINATE', 'Y_COORDINATE'...etc)
I tried just putting all in the same code but I got this error: "TypeError: AlterField() takes at most 4 arguments"
BTW, I'm using ArcGIS 10.2.2, Standard (ArcEditor) License. Thanks for the help!
Aucun commentaire:
Enregistrer un commentaire