I have an ArcGIS Pro project with a finished layout. I realised that I have to overwrite on of the layers of the map with a spatial join. When you overwrite a layer in ArcGIS Pro, it typically gets first removed and then re-added which will remove symbology and legend order. So I did that in a different map in the same project and it still removed the layer from the map that I use in the final layout. Is there a way to avoid it in arcpy? I will have to update the layer again and would like to keep the data analysis script and the layout script in one project.
Solved! Go to Solution.
In the options, if you un-check the Remove layers that..... setting, it will update the layer, but not remove-re-add it to the map.
This way, it stays in the correct order, and retains it's symbology, etc.
R_
In the options, if you un-check the Remove layers that..... setting, it will update the layer, but not remove-re-add it to the map.
This way, it stays in the correct order, and retains it's symbology, etc.
R_
.. and remember to save the new settings before running the analysis.