I'm trying to export the features from one Feature class to another in python...
the syntax is
arcpy.FeatureClassToFeatureClass_conversion("Line1", "D:\Arcsde\Transects_Test\Naliya2\Test\Merge.gdb", "Line_Temp1")
But it throws error
File "C:\Program Files (x86)\ArcGIS\Desktop10.2\arcpy\arcpy\conversion.py", line 1675, in FeatureClassToFeatureClass
raise e
ExecuteError: Failed to execute. Parameters are not valid.
ERROR 000732: Input Features: Dataset Line1 does not exist or is not supported
Failed to execute (FeatureClassToFeatureClass).
Solved! Go to Solution.
Try
arcpy.FeatureClassToFeatureClass_conversion("Line1", r"D:\Arcsde\Transects_Test\Naliya2\Test\Merge.gdb", "Line_Temp1")
See /blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python?sr=search&searchId=74920c51-3cdb-... for info on path names in Python
good way to make sure you have syntax correct is to manually run the tool and then copy the python snippet in the results tab (right-click gives you the option).
edit: or for other options on how to write the pathname in the command, look at the samples in the help doc
Try
arcpy.FeatureClassToFeatureClass_conversion("Line1", r"D:\Arcsde\Transects_Test\Naliya2\Test\Merge.gdb", "Line_Temp1")
See /blogs/dan_patterson/2016/08/14/filenames-and-file-paths-in-python?sr=search&searchId=74920c51-3cdb-... for info on path names in Python
good way to make sure you have syntax correct is to manually run the tool and then copy the python snippet in the results tab (right-click gives you the option).
edit: or for other options on how to write the pathname in the command, look at the samples in the help doc