Error when overwriting feature layer

142
0
12-19-2021 10:52 AM
ErikaJimenez_Rivera1
New Contributor II

According to the documentation, there is a paramater (context) in the tool arcgis.features.analysis.join_features. In  this parameter, there is an option to overwrite an existing feature layer.

It is a dictionary, and I am writing it like that. However, I still get an error, saying the name already exist. Which I thought would be solved by enabling the overwrite. 

Am I writing it wrong? or is there a mistake in my code?

ErikaJimenez_Rivera1_0-1639939938846.png

 

 

*Update:

So, I realized that maybe I needed to call the layer to be overwritten per se. which I just did at the beggining of the code.

ErikaJimenez_Rivera1_0-1639950353862.png

ErikaJimenez_Rivera1_1-1639950443324.png

And it finally works! The error does not appear anymore.

HOWEVER, when reviewing the feature layer I notice that it is adding more layers instead of overwriting the existing layer. 

ErikaJimenez_Rivera1_2-1639950504071.png

This service is going to be updated regularly, so I don´t want to accumulate layers. 

So, that was the update. Any suggestions or recommendations are more than welcome!

thanks.

 

 

0 Replies