ScottChang25

ArcGIS 10.1:Using XYZ coordinates to do MakeXYlayer-Runtime Error 000732. Why?

Discussion created by ScottChang25 on Jan 22, 2013
Latest reply on Jan 29, 2013 by ScottChang25
Hi all,
I have the following Excel .xls file:
ID    Pt_ID        X                 Y               Z
1     BH1          -76.301725   39.392986    0.1
2     BH2          -76.300981   39.392928    0.2
3     BH3          -76.301694   39.392611    0.3
.      .....          ..............     ............     ....
9     BH9          -76.331157   39.396452    0.9
10   Well1        -76.332654    39.395984   1.1

I executed the following Python-ArcPy script:
# import system modules 
import arcpy
from arcpy import env

# Set environment settings
# env.workspace = r"C:\TEMP\BS_Test.gdb"  # New!!!
 
try:
    # Set the local variables
    # in_Table = "firestations.csv"
    tb = r"C:\TEMP\WritingGeometries\ApgRImmrpWGS.xls\ApgRImmrpWGS$"
    xc = "X"
    yc = "Y"
    zc = "Z"

    out_Layer = "Pointlocations_layer"
    saved_Layer = r"c:\TEMP\APGriMMRPBHsWell.shp" # not .layer!!!
 
    # Set the spatial reference
    # spRef = r"Coordinate Systems\Projected Coordinate Systems\Utm\Nad 1983\NAD 1983 UTM Zone 11N.prj"
    spRef = r"Coordinate Systems\Geographic Coordinate System\World\WGS 1984" 
 
    # Make the XY event layer...
    arcpy.MakeXYEventLayer_management(tb, xc, yc, out_Layer, spRef)
 
    # Print the total rows
    print arcpy.GetCount_management(out_Layer)
 
    # Save to a layer file
    # arcpy.SaveToLayerFile_management(out_Layer, saved_Layer)
    arcpy.CopyFeatures_management(out_Layer, saved_Layer) # New!!!

except:
    # If an error occurred print the message to the screen
    print arcpy.GetMessages()


in my newly installed ArcGIS 10.1 and I got Error 000732 - see the attached file for detals. 

Please kindly help and tell me where I made mistakes and how to resolve this problems.

Thanks,
Scott Chang

Attachments

Outcomes