Hi Christopher, Thanks for your valuable response.I followed your instructions to create a new Python script (chrisMakeXYlayer.py):>>> # chrisMakeXYlayer.py for 12 points
... # Description: Creates an XY layer and exports it to a layer file
... # Author: ESRI - modified by Scott Chang per Christopher Thompson (Date: 11 Oct 2012)
... # import system modules
... import arcpy
... from arcpy import env
... # Set environment settings per Chris T.
... env.workspace = r'C:\TEMP\BS_Test.gdb'
...
... try:
... # Set the local variables
... # in_Table = "firestations.csv"
... my_csv = r'C:\TEMP\WritingGeometries\sc12points.csv'
...
... x_coords = "x-coord"
... y_coords = "y-coord"
... z_coords = "z-coord"
... out_Layer = "firestations_layer"
... saved_Layer = r"c:\TEMP\firestations.lyr"
...
... # Set the spatial reference
... spRef = r"Coordinate Systems\Projected Coordinate Systems\Utm\Nad 1983\NAD 1983 UTM Zone 11N.prj"
...
... # Make the XY event layer...
... arcpy.MakeXYEventLayer_management(my_csv, x_coords, y_coords, out_Layer, spRef, z_coords)
...
... # Print the total rows
... print arcpy.GetCount_management(out_Layer)
...
... # Save to a layer file
... arcpy.SaveToLayerFile_management(out_Layer, saved_Layer)
...
... except:
... # If an error occurred print the message to the screen
... print arcpy.GetMessages()
...
Executing: MakeXYEventLayer C:\TEMP\WritingGeometries\sc12points.csv x-coord y-coord firestations_layer "PROJCS['NAD_1983_UTM_Zone_11N',GEOGCS['GCS_North_American_1983',DATUM['D_North_American_1983',SPHEROID['GRS_1980',6378137.0,298.257222101]],PRIMEM['Greenwich',0.0],UNIT['Degree',0.0174532925199433]],PROJECTION['Transverse_Mercator'],PARAMETER['False_Easting',500000.0],PARAMETER['False_Northing',0.0],PARAMETER['Central_Meridian',-117.0],PARAMETER['Scale_Factor',0.9996],PARAMETER['Latitude_Of_Origin',0.0],UNIT['Meter',1.0]];-5120900 -9998100 10000;-100000 10000;-100000 10000;0.001;0.001;0.001;IsHighPrecision" z-coord
Start Time: Thu Oct 11 14:40:20 2012
Failed to execute. Parameters are not valid.
ERROR 000728: Field x-coord does not exist within table
ERROR 000728: Field y-coord does not exist within table
ERROR 000728: Field z-coord does not exist within table
Failed to execute (MakeXYEventLayer).
Failed at Thu Oct 11 14:40:20 2012 (Elapsed Time: 0.00 seconds)
I have no ideas why I got these errors. Please kindly help and advise again.Thanks,Scott Chang