Select to view content in your preferred language

Incorrectly receive 000210 error in Python script

866
0
06-23-2010 03:21 PM
RossConner
New Contributor
In my python script, I can copy one layer to a geodatabase on my C:\ but I cannot copy another layer to the same location.

Here is the relevant part of my code:

in_x = "Latitude"
in_y = "Longitude"
Out_XY_lyr = "FWMIS_XY"
Out_NAD_Layer = "FWMIS_NAD83"
spref = r"Coordinate Systems\Geographic Coordinate Systems\North America\North American Datum 1983.prj"

gp.MakeXYEventLayer(Input, in_x, in_y, Out_XY_lyr, spref)
mgp.xprint("Made XY event layer")

Out_NAD_XY = Out_GDB+"/FWMIS_NAD83" # Set .gdb location
gp.OutputCoordinateSystem = spref
gp.CopyFeatures(Out_XY_lyr, Out_NAD_XY) # This Copy Feature works flawlessly
mgp.xprint("Made XY event permanent")

gp.MakeFeatureLayer_management(Out_NAD_XY, Out_NAD_Layer)
mgp.xprint("Made XY layer")

gp.OutputCoordinateSystem = r"Coordinate Systems\Projected Coordinate Systems\UTM\NAD 1983\NAD 1983 UTM Zone 12N.prj"
gp.SelectLayerByAttribute(Out_NAD_Layer, "NEW_SELECTION", '"ATS_MER" = \'4\'')
count = gp.GetCount_management(Out_NAD_Layer)
Out_UTM12 = Out_GDB+"/FWMIS_UTM12" # Same .gdb as before, just a different FC name
if count > 0:
    gp.CopyFeatures(Out_NAD_Layer, Out_UTM12) # This consistently throws up an ERROR 000210

### CODE ENDS ###

Again, I am just testing this script on my C: drive, and I don't have SDE. This is running on ArcView 9.3.1 .

Any ideas or is this a bug?

Thanks in advance,

Ross
0 Kudos
0 Replies