How do you properly save a shapefile as a layer file to prevent changes to the original?

697
1
04-18-2019 04:17 PM
Kevin_C
New Contributor III

I have a Map Document that exists on our Department's Network Drive that contains a lot of (<200) feature classes and layers. I wanted to work with one specific feature class and use it for a map I'm creating. So I save the layer as a layer file in my work machine. I then proceed to edit this file using ArcGIS to create new fields, delete existing ones, change symbology etc. I make some pretty heavy changes to the file and realize I screwed up by deleting a column I shouldn't have. Oh well, glad it's backed up in the Map Document. 

I check the Map Document and go to the layer in question. The changes I made to the layer file I saved in my local machine were applied to the original layer. The columns were deleted in the original map doc.

How is this possible? How does saving the feature class as a separate layer file in my local machine not prevent this kind of screw up? 

Thanks for the help. I really hope I haven't made permanent changes to the original layer, although it looks like that may be the case? 

0 Kudos
1 Reply
JimCousins
MVP Regular Contributor

Perhaps I do not understand your question, but from the help:

A layer file (.lyr) is a file that stores the path to a source dataset and other layerproperties, including symbology. In comparison to a shapefile, a layer file is a just a link\reference to actual data, such as a shapefile, feature class, etc.

So, as a pointer to the data, the source is the same and is exposed to editing. You would need to make an actual copy of the source to edit and avoid altering the original file.

Regards,

Jim

0 Kudos