I want to add points to a shapefile interactively using pythonaddins and display them over map. Points are added to shapefile but not to display. Please suggest how to fix this discrepancy.
class AddPoints(object):
"""Implementation for points_addin.tool1 (Tool)"""
def __init__(self):
self.enabled = False
self.shape = 3
def onMouseDownMap(self, x, y, button, shift):
xy = (x,y)
cursor = arcpy.da.InsertCursor(r'C:/temp/points.shp', ("SHAPE@XY"))
cursor.insertRow([xy])
arcpy.RefreshTOC()
arcpy.RefreshActiveView()