featureclass to featureclass conversion

850
1
Jump to solution
10-14-2016 01:44 AM
MANESK
by
New Contributor III

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).

Tags (1)
0 Kudos
1 Solution

Accepted Solutions
RebeccaStrauch__GISP
MVP Esteemed Contributor

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

Feature Class to Feature Class—Help | ArcGIS for Desktop 

View solution in original post

1 Reply
RebeccaStrauch__GISP
MVP Esteemed Contributor

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

Feature Class to Feature Class—Help | ArcGIS for Desktop 

View solution in original post