Wes thank you i will incorporate that into the code. Also how would i create multiple points and actually have them created to the feature class?
I would like to populate the POINT_X AND POINT_Y when the point is created.
i have add to my code to try to get the x,y populated but i get an error, i am thinking it's a syntax error.
File "C:\GIS\Python\AddPoint\AddPoint.py", line 24, in <module>
cursor.insertRow(row_value)
TypeError: sequence size must match size of the row
#import modules
import arcpy
arcpy.env.qualifiedFieldNames = False
An = "AnimalPoints" #target point feature class Animal Sightings
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
dfsr = df.spatialReference
fcsr = arcpy.Describe(An).spatialReference
if dfsr.name == fcsr.name:
"""Now do your work"""
point = arcpy.GetParameterAsText(0) #click
for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):
x,y = prow[0]
del prow
row_value = ([(x,y)])
with arcpy.da.InsertCursor(An,('POINT_X', 'POINT_Y','SHAPE@XY')) as cursor:
cursor.insertRow(row_value)