arcgis - ArcMap 10.2 Geoprocessing overwrite -


i have locations shapefile trying overwrite. have enabled geoprocessing options overwrite geoprocessing operations. opened analysis tool created original locations shapefile , tried rerun tool same input , output. receiving 2 errors, 1, warning 000725, indicating output files exist , 1 error 000723, indicating input files in table of contents not exist or not supported. thoughts?

there many possible causes second warning input not existing; maybe provide more information.

i familiar first warning output existing. because environment setting "env.overwriteoutput" not working properly. typical work-around script check existence of output , delete output if exists before generating new output. here simple example involving creating backup of feature class:

import os  import arcpy  arcpy import env    fc = "name_of_your_feature_class"  fc_dir = r"path_to_your_feature_class"  out_dir = r"directory_to_copy_feature_class_to"    env.workspace = fc_dir  env.overwriteoutput = true    in_fc = os.path.join(fc_dir, fc)  out_fc = fc + "_backup"    try:      a.featureclasstofeatureclass_conversion(in_fc, out_dir, out_fc)  except a.executeerror: #in case env.overwriteoutput not work      print "env.overwriteoutput malfunctioning: attempting work-around..."      try:          if a.exists(out_fc):              a.delete_management(out_fc)              a.featureclasstofeatureclass_conversion(in_fc, out_dir, out_fc)              print "work-around complete."      except exception e:          print "work-around failed."          print e

i hope helps!

tom


Comments

Popular posts from this blog

toolbar - How to add link to user registration inside toobar in admin joomla 3 custom component -

linux - disk space limitation when creating war file -

How to provide Authorization & Authentication using Asp.net, C#? -