Now I know that saving layer files as lyr format is "not in production" despite many of us scream for this functionality, but I have come across a chicken and egg situation. About 9.9 times out of 10 when someone sends me a shapefile with the associated lyr file they have not created it with a relative path so the lyr file is pointing to their local machine.
In ArcMap you can right click on a lyr file in the catalog panel (or ArcCatalog) go to properties and reset the data source path and this updates the lyr file. You are then able to add the layerfile to the map and display the data.
Would be very helpful if ArcPro can expose the properties of a lyr file so these sort of errors can be fixed.
I could do it in ArcMap, but I'm using pro and bringing in the broken lyr file into ArcPro, fixing the data source internally is no use as I can't save it back as a lyr file! No point creating a lyrx if everyone else is using ArcMap...
Duncan, best practice would be to exchange layer packages rather than data with a layer file.
Saving layers and layer packages—Help | ArcGIS Desktop
You shouldn't need to reset the data source. Instead, use Apply Symbology From Layer—Data Management toolbox | ArcGIS Desktop
Just been devils advocate!
You try telling that to government agencies, international agencies,students, consultancies and NGO's....
These are the people I work with. I'm lucky if I even get any metadata, which is usually none at all most of the time.
Yes, changing habits can be a long process. Help us educate all users in best practices for data sharing!!!
I find it amazing that I can't do anything to edit a layer file within ArcGIS Pro though. It has basically become a read only file. If you want to tweak it. Add it to a map, make the changes then share it back out as a new layer file. That's cumbersome!
Problem is that Apply Symbology From Layer is pretty buggy, especially when used via python or even in model builder. Many properties such as number formatting of the feature class just don't get applied.
At our organization, we keep layer files with read-only permissions for users on a network drive for standardized symbology. In ArcCatalog, you were able to right-click on a layer and choose properties to edit the layer file properties.
In the Catalog Pane and Catalog View in ArcGIS Pro, this functionality is lost.
Users should be able to modify layer file properties from the Catalog Pane or View as they were able to in ArcCatalog.
Currently, this is on Version 2.6.6 that I was documenting this idea for.
What version of ArcGIS Pro are you using?
@ABishop , I am using 2.6.6. I realized I did not include this in my original post and made an edit at the bottom of the main post.
OK.. I see it. I am using ArcGIS Pro 2.8.2 and I also cannot see the functionality of editing the properties of a layer file. Quite frustrating!
I did some searches online too and ESRI doesn't seem to have documentation on it either. Maybe submit this as an idea on their idea page?
Seems the only work around is to make the changes to the layer then save over the existing layer. Ugh.
I'm in Pro 2.9.5 and we still don't have this functionality. It's another example of Pro's catalog not being up to snuff.
Please let us edit LYRs and LYRXs in catalog so we don't have to keep saving over them.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.