I used the rename tool to rename a set of layers. However, when I ran it, it renamed them in the catalog tree but not in the Layer Properties or when added to a map. See screen shots below. Any help would be appreciated.
When this doesn't work http://pro.arcgis.com/en/pro-app/help/projects/rename-project-items.htm
try this http://pro.arcgis.com/en/pro-app/tool-reference/data-management/rename.htm
but that says it won't rename layers since layers are a reference to a dataset
which is somewhat circular, but my guess would be to rename the dataset first, then make the layer... it would definitely provide less confusion (the links are for pro, but they are the same for arcmap
Thank you Dan. Renaming the original dataset will work, however, when I go to save it as a layer file, ArcGIS attaches "_Save_to_Layer_File" at the end of each feature class, hence the need for the renaming process on the layers. Is there any way to stop it from attaching this to each feature class name?
If doing it with the tool manually, just delete the offending addendum. If using the tool in a script, you have control on the output filename. many tools in Arctoolbox append extra bits at the end of a filename... probably so you know what they are, or perhaps to prevent overwriting existing data (as in the case of the copy tool)
I am using all of these tools in a model. Please see the screenshot below.
This is one line of the model which 1) iterates through a gdb does a test to see if a feature class has a specific name, 2) if it does, it creates a feature layer, 3) saves it to a layer file and 4) gives the layer a specific symbology. I am carrying the feature class name through the process using inline variables, but when I try to use an inline variable within the save to layer file, I get an error "Item not found in this collection". If I leave it blank, it will attach "Save_to_Layer_File".
oh... now the model appears... sigh.... I don't suppose you can put in the name you want or pull them from a list... of write a script to do that step.
I will defer to those that use models... and share it with Model Builder and Mapping and Charting and Python to see if anyone has done anything similar
The same thing happens regardless of being in a model. It happens in running the model, running the Rename Tool by itself, and running it in the python window itself. Ill look into a list or script. Thank you.
In this model , could you apply symbology before you save to layer file? Then you can save to layer file after the symbology is applied, saving it to the name you want in the first place (no rename required).
Note when you run Make Feature Layer Model Builder sets a default name but you could define your own and reference it there in the layer name for example %variable%. Same with the layer file name when you save it. That 'variable' model element could be created using Calculate Value or Parse path and then set as a precondition to Make Feature Layer so you ensure the name gets generated before Make Feature Layer is run.
Retrieving data ...