3

Does anybody know how to fix a link between shapefile and layer file in ArcGIS 10?

Every time I add layer file, there is a small exclamation mark next to icon and I have to define a source (path to a relevant shapefile).

Therefore, I was wondering if there is a way for ArcGIS to remember that, so I don't have to do it every time I add that layer file?

  • 2
    Resave the layer file. – Fezter Sep 16 '13 at 2:52
3

Right click on the layer in table of contents.
Select data> repair data source.
Then save the layer file again. There could be issues with either your MXD location, or you relative/actual path setting.
I use the relative path method but ALWAYS keep my MXD in a folder directly under the data.

always keep the mxd file in the folder together

Not exactly (but I have hundreds of long life documents (mxd)). I use the relative depicted in the link except that my mxd folder is "in-line" with my data folder.
mypath
"Maps" being where my mxd files are.
The bottome portion of the image is not what I do either.
I use a region/project folder structure , and then split out my data types inside the project.
With basemaps being at the root data level.
That is just what works for me. I can come back to documents years later, if the data has been moved I can still repair and it will repair "all" data in the document easily.
The point of the relative and absolute options are that each user can use it differently.
As-per their needs.

| improve this answer | |
  • Thanks mate, works like a charm :) btw, what is the difference between relative and actual path setting? so, you recommend to always keep the mxd file in the folder together with shp and databases files? cheers – user22022 Sep 16 '13 at 5:03
  • 1
    For workflow purposes I use to have my shapefiles/databases in a subfolder to where I store my mxd's. That way I can just press the home button and chose the relevant folder when I want to add data (instead of having a folder connection - I usually have a number of short-time projects going on simultaneously). – Martin Sep 16 '13 at 7:52
  • 1
    Actual path (or absolute path) stores the entire path as part the the file names. (EX: D:\Maps\data\final\Base). But relative path only stores the difference between the .mxd or .lyr file and the actual data. (EX: ..\Data\final\Base). If you move the Maps directory to a new drive the absolute path will be broken but the relative path will continue to work since the Base data is still under the Maps directory. – Lemur Sep 16 '13 at 14:38
0

I used to use relative paths but I kept getting weird errors where paths would be broken even though nothing changed. This happened with layer files as well. I would add them into a dozen mxds and when I came back to them the links would all be broken. Using absolute paths is more fail-safe.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.