GeoEco.ArcGIS.GeoprocessorManager.CopyArcGISObject
- classmethod GeoprocessorManager.CopyArcGISObject(source, destination, overwriteExisting, correctTypes, typeDisplayName)
Copies the specified ArcGIS object.
First, if overwriteExisting is True and destination exists, it will be deleted with the
Delete()geoprocessing tool. Then, if source is a feature class, shapefile, or feature layer, it will be copied withCopyFeatures(). If source is something else, it will be copied withCopy().- Raises:
ValueError – The source object does not exist or the geoprocessor’s
Describe()function reports that it is not one of the types specified by correctTypes, or the destination object exists but either it is not one of the correctTypes or overwriteExisting is False.- Parameters:
source (
str) – Path to the object to copy (e.g. a file, directory, raster, shapefile, table, etc.). Minimum length꞉ 1.destination (
str) – Path to the copy to create. Minimum length꞉ 1.overwriteExisting (
bool) – If True, destination will be overwritten.correctTypes (
listofstr) – List of data types that the object is expected to be, chosen from the possible values of the dataType property of the object returned byDescribe(). 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.