ArcGIS Pro 2.8.0: Removing Feature Class Removes Layers

2700
11
Jump to solution
06-16-2021 06:41 AM
JenniferLink1
New Contributor III

Hello,

After installing ArcGIS Pro 2.8.0 I noticed that when I delete a feature class from a file geodatabase, that the corresponding layers that were attached to my original feature class are deleted from my maps. Previously, I would see a red exclamation mark that indicated that the source layer was missing. 

Is anyone else having this experience?

Thanks,

Jen

0 Kudos
1 Solution

Accepted Solutions
KoryKramer
Esri Community Moderator

A better way to change the data source of a layer is to use Set Data Source from the layer properties: 

KoryKramer_0-1624056230497.png

https://pro.arcgis.com/en/pro-app/latest/help/projects/update-data-sources.htm

You can move your .aprx to a new location and as long as it can still access the data, you'll be fine.  If it can't access the data, you will end up with broken data links - your layers won't disappear from maps.

View solution in original post

11 Replies
DanPatterson
MVP Esteemed Contributor

That is a good thing isn't it?  It certainly does when you have a project open, I don't know if it does when you delete something that isn't in the current project or map view.


... sort of retired...
JenniferLink1
New Contributor III

I actually haven't run across this before for some reason. But it did happen the other day when I created a feature class, added it as a layer to my map, and then realized I wanted to update the source to a different data source. I had the layer set up with some complex symbology. I was anticipating that if I deleted the source feature class I could just repoint to the new one it would work. Instead my layer was deleted and I lost the symbology that I had set up.

If a source is removed I prefer that I have something to identify that the source is missing and I need to update it. I'm worried now that if I move the project file to a new location (for instance a new drive) and I don't move the related data, that all my layers will be deleted when I open the project because the data source cannot be found. This means losing all of the information stored with the layer as well.

KoryKramer
Esri Community Moderator

A better way to change the data source of a layer is to use Set Data Source from the layer properties: 

KoryKramer_0-1624056230497.png

https://pro.arcgis.com/en/pro-app/latest/help/projects/update-data-sources.htm

You can move your .aprx to a new location and as long as it can still access the data, you'll be fine.  If it can't access the data, you will end up with broken data links - your layers won't disappear from maps.

MicZatorsky_AEC
Occasional Contributor III

Yes, but its not new.  It's happening in 2.7.3 also, and in IMHO, it is definitely  not a good thing.  A broken link is fine.

A layer represents work - symbols, def query, labeling etc...  I do not want to lose that work just because I deleted and replaced the FC the layer referred to in the same session.  (yes, I can back up to a layer file, but that's not exactly efficient)

My scenario - working in data analysis I have a Notebook that results in a new feature class being created each time the script is run.  Development is iterative.  My environment is set to overwrite, so as I'm developing I frequently blow away the old FC and create a new one. The one FC is represented on the map as several different layers, each with different def queries, labels and symbolization. Running my script deletes the old FC,  causing ALL my layers to evaporate ☹️

So I work in two projects, one for data processing, and then another to view, query, and symbolize the result.  Not the seamless environment I imagined Notebooks would allow. 

JenniferLink1
New Contributor III

Agreed. This is a problem for many of my workflows as well. I had no idea this had been updated since 2.7.3. I guess I have been lucky not to run across it.

DanPatterson
MVP Esteemed Contributor

Sounds like esri should have made it an "optional" parameter for Project Options. 

Some like it being removed....

Some definitely don't....

Sounds like a good issue for consumer choice ... flagging Kory

  ( @KoryKramer where would this idea go... or why was the decision made?)


... sort of retired...
0 Kudos
JenniferLink1
New Contributor III

Configurable settings are definitely a plus!

0 Kudos
KoryKramer
Esri Community Moderator

I don't think this is new.  I explained some of this behavior over on https://community.esri.com/t5/arcgis-pro-ideas/switching-data-sources-in-arcgis-pro/idc-p/930706/hig...  

When you are working in a project, the project will keep things in sync.  The thread I point to above has to do with renaming and trying to "swap out" feature classes, but I think some of the underlying principles are the same.  

Here is a difference that I'm seeing though when I try to delete a feature class (from the Catalog window) that is the source of a map layer in ArcMap: 

KoryKramer_0-1624052937752.png

In Pro, I am not given the same head's up about this action potentially affecting map content...

KoryKramer_1-1624052982268.png

This is something that I can take to the dev team...

 

JenniferLink1
New Contributor III

Ok, so just to give you a use case. I have a layer that is pointing to a feature class in one geodatabase. I want to point to a feature class that has the same field definitions in a new geodatabase. The only way I can do this safely is to right click on the layer, select Properties > Source > Set Data Source before deleting the initial feature class. I assumed if I deleted the feature class from the geodatabase, that ArcGIS Pro would just provide a red exclamation mark beside the layer as it does if I open my project and the data sources are missing. If syncing the layer with the data source by deleting it is the expected behavior, then an updated warning message would be worthwhile. 

0 Kudos