every time I open the same lyr file I have to do data/repair data source (link to the shp file).
I tried to save/export that shp file again, and create the new layer file as well, but every time the same thing happens. The Arc does not remember the link between these two.
Moreover, when I define the data source and the shp file appears in Arc, I have to define the symboloy from scratch (via properties/symbology/import dialogue)
Any ideas how to permanently define the link between the shp and layer file in ArcGIS 10.2 for Desktop? (When drag lyr file to automatically link the shp file)
Best Answer
As you can see from the comment thread above, layer files and relative paths are a bit complicated.
The problem is that a layer file (*.lyr) can either hold absolute paths or relative paths, but there doesn't seem to be any (easy) way to ascertain which it uses, after the layer file has been created.
To create a layer file with relative paths, there are two options:
(Obviously to choose absolute paths do the above with the other option chosen.)
So in your situation it sounds like you might need to recreate your layer file using either absolute paths or relative paths (depending on your workflow):