Advertisement
Guest User

Untitled

a guest
Aug 23rd, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. class ToolClass2(object):
  2. """Implementation for PPPpoint_addin.tool (Tool)"""
  3. def __init__(self):
  4. self.enabled = True
  5. self.shape = "NONE" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.
  6. def onMouseDownMap(self, x, y, button, shift):
  7. fc = r"C:Testpourpoint.shp"
  8.  
  9. pt = arcpy.Point()
  10. pt.X = float(x)
  11. pt.Y = float(y)
  12.  
  13. ptGeoms = [arcpy.PointGeometry(pt)]
  14. cursor = arcpy.da.InsertCursor(fc, ['SHAPE@'])
  15. cursor.insertRow([pt])
  16. del cursor
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement