GeoEco.ArcGIS.GeoprocessorManager.DeleteArcGISObject

classmethod GeoprocessorManager.DeleteArcGISObject(path, correctTypes, typeDisplayName)

Deletes the specified ArcGIS object, if it exists.

The object will be deleted with the Delete() geoprocessing tool. If the object does not exist, Delete() will not be called, and no error will be reported.

Raises:

ValueError – The object exists but the geoprocessor’s Describe() function reports that it is not one of the types specified by correctTypes.

Parameters:
  • path (str) – Path to the object (e.g. a file, directory, raster, shapefile, table, etc.). Minimum length꞉ 1.

  • correctTypes (list of str) – List of data types that the object is expected to be, chosen from the possible values of the dataType property of the object returned by Describe(). Please see the documentation for that function for the possible values.

  • typeDisplayName (str) – Name of the expected data type of the object to display in logging messages. This is usually a more generic name than the entries that appear in correctTypes. For example, if the object is expected to be some kind of table, correctTypes may contain five or ten possible values, while typeDisplayName might simply be “table”. Minimum length꞉ 1.