Alter aliases of ObjectID, Shape, Shape_Length, Shape_Area with arcpy

384
0
03-24-2017 06:31 AM

How can I alter the aliases of the required fields (ObjectID, Shape, Shape_Length, Shape_Area) in a GDB with Python?

For example I have this code:

#!/usr/bin/python
# -*- coding: utf-8 -*-
rf = ur'D:\Δοκιμές\Tester'
gdb = rf+'\\Ant.gdb'
p = ['Parcels','Parts']
for a in range(2):
    RFields = OrderedDict([(arcpy.Describe(gdb+'\\'+p).OIDFieldName,u'Α/Α'),(u'Shape',u'Γεωμετρία'),(arcpy.Describe(gdb+'\\'+p).lengthFieldName,u'Περίμετρος'),(arcpy.Describe(gdb+'\\'+p).AreaFieldName,u'Εμβαδόν')])
    for key in RFields.keys():
        arcpy.AlterField_management(gdb+'...
,key,key,RFields[key])

But it produces an error.

Is it possible to do what I want?

Tags (2)
0 Kudos
0 Replies