DuncanRager

Copy Features Snag

Discussion created by DuncanRager on Apr 12, 2011
Latest reply on Apr 12, 2011 by DuncanRager
Greetings,

I'm writing a basic snap to line script that goes something like this...

## Snap to Line

# import modules
import arcpy, os, sys
from arcpy import env

# grab user inputs
env.workspace = arcpy.GetParameterAsText(0)
snapLine = arcpy.GetParameterAsText(1)
snapType = arcpy.GetParameterAsText(2)
snapDistance = arcpy.GetParameterAsText(3)
fcBackupDir = arcpy.GetParameterAsText(4)

# define variables
fcList = arcpy.ListFeatureClasses()

# make backup copies of features
for fc in fcList:
 fcBackupName = fcBackupDir + fc
 arcpy.CopyFeatures_management(fc, fcBackupName)
 
# set snapping environment
snapEnv1 = [snapLine, snapeType, snapDistance]

# snap to line
for fc in fcList:
 arcpy.Snap_edit(fc, [snapEnv1])


...and I keep getting an error saying...

Runtime error <class 'arcgisscripting.ExecuteError'>: ERROR 000210: Cannot create output C:\GIS\Base\NHD\SGBD\Raw_Shapefiles\Bank_P.shp Failed to execute (CopyFeatures).


Does this have to do with a schema lock? Is my directory syntax off?

Thanks so much,

DR

Outcomes