Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class ToolClass2(object):
- """Implementation for PPPpoint_addin.tool (Tool)"""
- def __init__(self):
- self.enabled = True
- self.shape = "NONE" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.
- def onMouseDownMap(self, x, y, button, shift):
- fc = r"C:Testpourpoint.shp"
- pt = arcpy.Point()
- pt.X = float(x)
- pt.Y = float(y)
- ptGeoms = [arcpy.PointGeometry(pt)]
- cursor = arcpy.da.InsertCursor(fc, ['SHAPE@'])
- cursor.insertRow([pt])
- del cursor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement