Using ArcGIS 10.2 Desktop I am trying to run a Merge function by Arcpy as
# Set environment settings
env.workspace = "E:\\GIS\\ROR"
path = "E:\\GIS\\Data\\"
featureClass = "band-tailed_pigeon.shp"
InputFeature = path + featureClass
FinaloutLocation = "E:\\GIS\\Data\\Final"
dissolve_1 = "dissolved_1.shp"
dissolve_2 = "dissolved_2.shp"
dissolve_3 = "dissolved_3.shp"
dissolve_4 = "dissolved_4.shp"
dissolve_5 = "dissolved_5.shp"
# Process: Merge
inFeaturesToMerge = [dissolve_1,dissolve_2,dissolve_3,dissolve_4,dissolve_5]
arcpy.Merge_management(inFeaturesToMerge, FinaloutLocation)
but I am getting this error:
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000725: Output Dataset: Dataset E:\GIS\Data\Final already exists.
Can you please let me know why this is happening?
Thanks
Solved! Go to Solution.
Well, FinaloutLocation = "E:\\GIS\\Data\\Final", is just that, a file location, not the name of a feature class in a gdb or a shapefile name.
Why are you defining input feature names then do nothing with them.
And please search for a read how to post code here.
Well, FinaloutLocation = "E:\\GIS\\Data\\Final", is just that, a file location, not the name of a feature class in a gdb or a shapefile name.
Why are you defining input feature names then do nothing with them.
And please search for a read how to post code here.
Link for Posting Code blocks in the new GeoNet as mentioned by Neil.