Hi,
I noticed that the field alias name, which is shown in the attribute table of ArcMap, does not correspond with the field alias name accessible in arcpy.
For example, when "manually" changing the field alias name in the .mxd's attribute table, the alias in arcpy does not change. (accessed alias in arcpy like this)
<SPAN class="keyword token">for</SPAN> field <SPAN class="keyword token">in</SPAN> arcpy<SPAN class="punctuation token">.</SPAN>ListFields<SPAN class="punctuation token">(</SPAN><SPAN class="string token">'<Featureclass>'</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">:</SPAN>
<SPAN class="keyword token">print</SPAN> field<SPAN class="punctuation token">.</SPAN>aliasName
<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN></SPAN>Is there a way to read the alias name with arcpy (the one created manually, which is saved in the mxd) ?
The reason for the question is that I work with a large amount of layers whose field alias names were modified manually in mxds and i need to access those aliases in arcpy. So I am looking for an automated way to read the aliases from the attribute table and then overwrite the actual field aliases with arcpy (using arcpy.management.AlterField).
I would highly appreciate any help or hints.