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+'\\'+p,key,key,RFields[key])
But it produces an error.
Is it possible to do what I want?
The Shape_Length and Shape_Area fields are system-managed geometry fields that ArcGIS maintains automatically. These are special because:
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.