ArcGIS Pro 2.5
I copied a table from fgdb to another, renaming it to my own name. However, in the TOC it shows up as the original table name which is now the alias. How do I either change the the table's alias name or get the proper name in the TOC?
Solved! Go to Solution.
Thanks George- I had tried that in the same project that the table is in. What made it work close that project, open another one, make the change, close that project down and re-open the original....
Add on to this question because I am having issues with the same...issue. Good old fashioned turn on and turn off again, but that doesn't really solve anything from a programmitic standpoint. I do a lot of cleanup post data creation/editing whirlwinds where I'm renaming a dozen files from a csv/pandas dataframe. Do either of you (hi @JoeBorgione , @George_Thompson ) know how to acheive a name AND alias change in arcpy?
Hi Joe. Good idea - try something that is. Yeah the issue of rename an FC from FGDB while updating basics is simply:
fc_orig = 'path/to/fc_orig' new_name = 'fc_renamed' fc_renamed = 'path/to/fc_renamed' arcpy.Rename_management(fc_orig, new_name) arcpy.AlterAliasName(fc_renamed, new_name)
That works but it still doesn't change the name in Table of Contents (TOC) automatically -The TOC will show the original name. But the Catalog will update (I may have F5'd, I cannot recall...). I do not recall this being an issue in Desktop. WHOA! Just noticed their is no "_management" "_conversion" etc. denoting module for the AlterAliasName tool. All right.
You might have to go into the aprx then and re-insert the new name table to get the the new alias name. I don't do much in the lines of mapping. I'm just a simple data miner.....
I have the same issue where the alias names (that I never asked for to begin with!) are added to the table of contents when I add the feature classes. These are usually sub-sets of some live AGOL data I downloaded. I know I can turn them off or change them back programmatically, but how can I just disable the creation of feature classes aliases altogether? I can't imagine ever wanting them. Have searched high and low for an solution, even scouring "feature class properties -> data sources" in arcpy, which is where I'd expect to find this. (Also, documentation isn't always clear what properties an object inherits. That was always obvious in ArcObjects.)
Some solace and empty, unnecessary response if I may. Nah I don't know about the structural location of or access to Alias, but seems when adding to a Table of Contents (in Pro at least), the Alias is listed. Seems you are fine doing:
arcpy.Rename_management(fp_fcs_orig, fp_fcs_new) # Now fp is renamed, so change alias on NEW fcs arcpy.AlterAliasName(fp_fcs_new, 'new_feat_name')
...just not satisfied with the structure? Anyways - everytime I rename, I also AlterAliasName and now when adding FC to a map the proper name appears. In the example I gave, I renamed an FC and then proceeded to change alias to match.
I'd like to see their documentation show the ArcPy references to ALL feature class properties, not just this limited set, with get (currently describe) and set (where appropriate).
Has anyone set a feature request/idea to turn off this behavior? It's really aggravating to rename a feature class or export a sub-set of selected data from another geodatabase, then when I add it to my map it uses the original feature name. I know. I'm preaching to the choir here.