Im trying to create a shapefile with input from a featurelayer
it fails with:
WARNING: Failed to convert: MyLayer. ERROR 000210: Cannot create output c:\temp\Shapes\MyLayer.shp
Failed to execute (CopyFeatures).
fc = r"c:\connections\MyEditor@MyDb.sde\mydb.measurement.Line"
arcpy.MakeFeatureLayer_management(fc,"MyLayer")
print(arcpy.GetCount_management("MyLayer"))
arcpy.FeatureClassToShapefile_conversion("MyLayer", "c:\\temp\\Shapes") #<-- This fails
#If I in the FeatureClassToShapefile_conversion uses the featureclass instead of the featurlayer it works.
arcpy.FeatureClassToShapefile_conversion(fc, "c:\\temp\\Shapes") #<-- This works
What can I be doing wrong? The count returns 420504 so the featuerlayer contains data