# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# Table_to_PointsFeature.py
# Created on: 2013-04-08 13:51:49.00000
#   (generated by ArcGIS/ModelBuilder)
# Usage: Table_to_PointsFeature <Projected_Spatial_Reference> <Input_XY_Table> <X_Field> <Y_Field> <Model_Output_Location> <Output_Feature_Class_Name> <Output_Feature_Class> 
# Description: 
# Take table features, project them, and convert them to a feature class
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy, os, gc

# Script arguments
#Projected_Spatial_Reference = arcpy.GetParameterAsText(0)

#Input_XY_Table = arcpy.GetParameterAsText(1)

#X_Field = arcpy.GetParameterAsText(2)

#Y_Field = arcpy.GetParameterAsText(3)

#Model_Output_Location = arcpy.GetParameterAsText(4)

#Output_Feature_Class_Name = arcpy.GetParameterAsText(5)

#Output_Feature_Class = arcpy.GetParameterAsText(6)

def main(SpatialRef,xy_table,x,y,out_location,out_name):
	arcpy.MakeXYEventLayer_management(xy_table, x, y, "in_memory\\xy_event_table", SpatialRef, "") # Process: Make XY Event Layer
	#arcpy.FeatureClassToFeatureClass_conversion("in_memory\\xy_event_table", out_location, out_name, "", "", "") # Process: Feature Class to Feature Class
	outFeatureClass = os.path.join(out_location, out_name)
	arcpy.FeatureToPoint_management("in_memory\\xy_event_table", outFeatureClass, "CENTROID")
	gc.collect()
	return


	


Create Table_to_PointsFeature.py