Did you ever get this process completed. i have a similar problem, i am looking to take features from SDE1 and send them to SDE2 and overwrite the features in SDE 2. i tried features to features tool but it doesn overwrite it. it adds a _1 after the feature name.
Lela,
you could always create your model in modelbuilder and then export it to python. Then you could add code that will check if certain files exist and if they do, delete them. Like this:
env.workspace = "Space where your output will be" if arcpy.Exists("your feature"): arcpy.Delete_management("your featuree")
That's how I do it.
Tim
that is what i am doing is starting in model builder and then exporting out into python after the system is proven. i just can figure out how to get model builder to overwrite the feature rather than add the _1 to it.
Did you try setting your geoprocessing options for overwriting outputs??
I think this must help
where is that located?
Thank you
Lela Harrington
In the menu bar, click on "geoprocessing", then click on "geoprocessing options"
😃
for python, i think you must use the command line after importing arcpy: <SPAN class="pln" style="font-size: 12px; color: #000000;">arcpy</SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">.</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;">env</SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">.</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;">overwriteOutput </SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">=</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;">True</SPAN>
<SPAN class="pln" style="font-size: 12px; color: #000000;">arcpy</SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">.</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;">env</SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">.</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;">overwriteOutput </SPAN><SPAN class="pun" style="font-size: 12px; color: #145680;">=</SPAN><SPAN class="pln" style="font-size: 12px; color: #000000;"> </SPAN><SPAN class="kwd" style="font-size: 12px; color: #8a4a0b;">True</SPAN>
if i put the model builder and save it as a python script where would i place this code for it to run?
This is exactly what I was looking for, Thanks!
Did you figure out where to put your code to run?
I know this thread is old, but I am still struggling with the overwrite option. I have the box checked in the geoprocessing options to overwrite the outputs, but it still creates a new shapefile with a "_#" added to the end. Why would this happen?
Does anyone know if this overwrite option is available in ArcGIS Pro 3.1.1?
Overwrite option in ArcGIS Prohttps://pro.arcgis.com/en/pro-app/latest/help/analysis/geoprocessing/basics/geoprocessing-options.htm
Les membres connectés peuvent publier, suivre les mises à jour, et plus encore. Nouveau ici ? Inscrivez-vous gratuitement.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.