Select to view content in your preferred language

Make feature layer modify shapefile

2422
4
12-29-2010 02:08 AM
OlivierOlivier
Regular Contributor
Hi,

Even it's not supposed to do so (according to the help), Make Feature Layer modify original shapefile. I have a simple modelbuilder that add fields after make feature layer, and unfortunately, I noticed that my original shapefile was modified, so it's not possible to run the same model several times unless you do a previous 'copy feature".

As I wanted to use MFL to avoid duplicating files, it loose much of its interest.
0 Kudos
4 Replies
LoganPugh
Frequent Contributor
A feature layer or table view is just a view (like a database view) of the data, not a copy of it. Any modifications to the data that the view points to will apply to the underlying data.
0 Kudos
OlivierOlivier
Regular Contributor
So I think that help should be changed as when you read it you don't think immediately that 'add field' toolbox after creating a temporary layer will modify the shapefile.

"The MFL tool is used to create a feature layer from an input feature class. The layer that  is created by the tool is temporary and will not persist after session ends unless session is saved.",
0 Kudos
LoganPugh
Frequent Contributor
That could be worded better, but what it means is that if you want the "layer" (i.e. the view of the data, not the data itself) to be persisted, you need to save the MXD (if the tool is being used in the context of ArcMap) or export it to a .lyr file.
0 Kudos
ChrisMathers
Deactivated User
You can think of feature layers and table views as python type variables. In python variable are just links that let you connect to an object. When you make a feature layer you create a link to the file. Feature layers are not lyr type layers, which store symbology, but a dynamic connection from the geoprocessor to a feature class. This is why they do not persist. To save a feature layer is to create a copy of the data it points to and editing a feature layer is to edit the underlying data.

I understand where you are coming from. I was confused about this for a long time. The docs do need to be edited to explain feature layers and table views better.
0 Kudos