fiendniu

how to set parameter for creating a new output feature class in script tool

Discussion created by fiendniu on Mar 28, 2012
Latest reply on Mar 29, 2012 by fabl
I am trying to make a script tool work with following code
input = arcpy.GetParameterAsText(0)
result = arcpy.GetParameterAsText(1)


arcpy.CreateFeatureclass_management("C:/TempArcGISCalculate/Scratch.gdb", result,"POINT","","","", "C:\TempArcGISCalculate\WGS_1984_UTM_Zone_17N.prj")
arcpy.AddField_management(result, "ClusterID","LONG")
arcpy.AddField_management(result, "C_LON_X","DOUBLE")
arcpy.AddField_management(result, "C_LAT_Y","DOUBLE")
arcpy.AddField_management(result, "C_Bearing","DOUBLE")
arcpy.AddField_management(result, "NearbyPtID","LONG")
arcpy.AddField_management(result, "NearbyLON_X","DOUBLE")
arcpy.AddField_management(result, "NearbyLAT_Y","DOUBLE")
arcpy.AddField_management(result, "NearbyBearing","DOUBLE")


the parameter setting for output is shown in attachment.

However, it keeps telling me:


<class 'arcgisscripting.ExecuteError'>: ERROR 999999: Error executing function.
Failed to execute (CreateFeatureclass).

Failed to execute (CopyExtracting)

Attachments

Outcomes