<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Creating multiple points with mouse click in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463796#M36350</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Thank you for tips. 1) Yes I try and 2) Yes, I have python window open to see any crashes. The problem is that I have an existing shapefile with attribute table with trees and I would like to update it with new rows. When I am clicking on map to place new tree all other trees are disappearing from map and table.&amp;nbsp; The fields (ID, Shape, Tree number, Lat and Long) are also not in the table.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Is it any way I can add multiple new rows without removing others? I also followed the steps from link you provided and I don't see the updated in the table.&lt;/P&gt;&lt;P&gt;Thanks a lot for help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Aug 2017 10:06:37 GMT</pubDate>
    <dc:creator>PaulinaR</dc:creator>
    <dc:date>2017-08-24T10:06:37Z</dc:date>
    <item>
      <title>Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463789#M36343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;I am quite a beginner with Python, thus I will be grateful for your help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;.&amp;nbsp; I want to create multiple points on my map. I managed to do that but unfortunately my attribute table is not updating (it is always only one row even I added multiple points). Could you take a look at my code at tell me where is the problem? For any help thank you so much!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;class Obstacle(object):
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Implementation for new_addin.tool (Tool)"""
&amp;nbsp;&amp;nbsp;&amp;nbsp; def __init__(self):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.enabled = True
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; self.shape = "circle" # Can set to "Line", "Circle" or "Rectangle" for interactive shape drawing and to activate the onLine/Polygon/Circle event sinks.
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onMouseDown(self, x, y, button, shift):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pass
&amp;nbsp;&amp;nbsp;&amp;nbsp; def onMouseDownMap(self, x, y, button, shift):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #workspace = r"\\\\abc\\home\\xxx\\Documents\\ArcGIS\\Default.gdb"&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #adding points to the map
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument ("CURRENT")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = mxd.activeDataFrame.spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pntFc = r"\\abc\home\xxx\Documents\ArcGIS\treepoints"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = arcpy.Point()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt.X = float(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt.Y = float(y)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptGeoms = [arcpy.Geometry ("POINT", pt, sr)]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists (pntFc):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(ptGeoms, pntFc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.InsertCursor (pntFc, "SHAPE@") as iCurs:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCurs.insertRow (ptGeoms)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView ()&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Paulina&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:35:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463789#M36343</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2021-12-11T20:35:49Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463790#M36344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;just by looking at your line 22, it appears to add all the geometry objects all at once, effectively creating a multipoint shape.&amp;nbsp; Perhaps you want to cycle through those points individually rather than all at once (ie you need to use insertrow with each point rather than the collected geometry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 09:16:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463790#M36344</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2017-08-23T09:16:23Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463791#M36345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, indeed. I would like to "cycle through those points individually" &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;. Could you give me some example how to do that? &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 09:48:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463791#M36345</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2017-08-23T09:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463792#M36346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;with&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;da&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;InsertCursor &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pntFc&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"SHAPE@"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; iCurs&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword token"&gt;for&lt;/SPAN&gt; pnt &lt;SPAN class="keyword token"&gt;in&lt;/SPAN&gt; ptGeoms&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCurs&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;insertRow &lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;pt&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;guessing wildly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:35:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463792#M36346</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2021-12-11T20:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463793#M36347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im interested&amp;nbsp;too learn how you capture multiple points at a time with this code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;onMouseDown will return 1 event per click with an xy, which should then run your code snippet&amp;nbsp;and insert the geometry.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How does ptGeoms get populated with more than a single point?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;UNLESS you mean when you use the tool multiple times&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;The tool may crash second time round due to locking or something, try running it with the 'python' window open inside ArcGIS as you click points, which will show if any crashes happen.&lt;/LI&gt;&lt;LI&gt;whilst looking at the attribute table - the table wont refresh by itself, you need to close it and reopen it to see the changes, or see this thread for some other tips:&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;A class="link-titled" href="https://gis.stackexchange.com/questions/59994/refreshing-open-attribute-table-in-arcmap-using-arcpy-rather-than-arcobjects" title="https://gis.stackexchange.com/questions/59994/refreshing-open-attribute-table-in-arcmap-using-arcpy-rather-than-arcobjects"&gt;Refreshing open attribute table in ArcMap using ArcPy rather than ArcObjects? - Geographic Information Systems Stack Exc…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 12:04:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463793#M36347</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2017-08-23T12:04:59Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463794#M36348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you are right. I am using the add-in and I press the 'point location"button every time I want to locate it. I tried to use RefreshActiveView but unfortunately I do not get the rows. My goal is to locate the trees on map. Each tree must have lat and long in the attribute table. Hope that you can help me to point where I am making mistake in the code. Thank you so much for previous tips!&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;def onMouseDownMap(self, x, y, button, shift):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #adding points to the map
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; mxd = arcpy.mapping.MapDocument ("CURRENT")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = mxd.activeDataFrame.spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pntFc = r"\\abc\home\xxx\Documents\ArcGIS\treepoints"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pt = arcpy.Point(x,y)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x = float(x)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; y = float(y)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ptGeoms = [arcpy.Geometry ("POINT", pt, sr)]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if not arcpy.Exists (pntFc):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(ptGeoms, pntFc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; else:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.InsertCursor (pntFc, ["TreeId", "SHAPE@XY"]) as iCurs: #create insert cursor
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #insert row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for pt in ptGeoms:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row=iCurs.insertRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("Lat", float(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue("Long", float(y))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; iCurs.insertRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Complete"&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:35:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463794#M36348</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2021-12-11T20:35:54Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463795#M36349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1) Did you try closing and reopening the table to see if the rows are there now?&lt;BR /&gt;(It wont refresh even with .refreshActiveView() &amp;nbsp;.... see the thread I linked.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Did you try having the python window open to see any crashes?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its not a problem with your script....the cursor will never have multiple rows as theres no way for it to do that&amp;nbsp;&lt;/P&gt;&lt;PRE class="" style="color: #000000; background: #f5f2f0; border: 0px; margin: 0.5em 0px; padding: 1em 1em 1em 3.8em;"&gt;&lt;CODE style="border: 0px; font-weight: inherit;"&gt;for pt in ptGeoms:&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Will always only have 1 geometry...as the event runs when you click the mouse and gives 1 point to the script...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Im pretty sure its all working perfect, your just not seeing the updates inside the table.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Aug 2017 15:29:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463795#M36349</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2017-08-23T15:29:25Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463796#M36350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi! Thank you for tips. 1) Yes I try and 2) Yes, I have python window open to see any crashes. The problem is that I have an existing shapefile with attribute table with trees and I would like to update it with new rows. When I am clicking on map to place new tree all other trees are disappearing from map and table.&amp;nbsp; The fields (ID, Shape, Tree number, Lat and Long) are also not in the table.&amp;nbsp; &lt;/P&gt;&lt;P&gt;Is it any way I can add multiple new rows without removing others? I also followed the steps from link you provided and I don't see the updated in the table.&lt;/P&gt;&lt;P&gt;Thanks a lot for help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 10:06:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463796#M36350</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2017-08-24T10:06:37Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463797#M36351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;EDIT - It looks like you are mixing cursor syntax between the new .da cursors, and the old Insertcursors.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;simple fix attached below using old style cursors I am familiar with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; font-weight: bold;"&gt;def &lt;/SPAN&gt;onMouseDownMap(&lt;SPAN style="color: #808080;"&gt;self&lt;/SPAN&gt;, x, y, &lt;SPAN style="color: #808080;"&gt;button&lt;/SPAN&gt;, &lt;SPAN style="color: #808080;"&gt;shift&lt;/SPAN&gt;):
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #808080;"&gt;#adding points to the map
&lt;/SPAN&gt;&lt;SPAN style="color: #808080;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;mxd = arcpy.mapping.MapDocument (&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"CURRENT"&lt;/SPAN&gt;)
&amp;nbsp;&amp;nbsp;&amp;nbsp; sr = mxd.activeDataFrame.spatialReference
&amp;nbsp;&amp;nbsp;&amp;nbsp; pntFc = &lt;SPAN style="color: #008000; font-weight: bold;"&gt;r"\\abc\home\xxx\Documents\ArcGIS\treepoints"
&lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;pt = arcpy.Point(x,y)
&amp;nbsp;&amp;nbsp;&amp;nbsp; x = &lt;SPAN style="color: #000080;"&gt;float&lt;/SPAN&gt;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/x.png" /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; y = &lt;SPAN style="color: #000080;"&gt;float&lt;/SPAN&gt;(y)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="background-color: #ffe4ff;"&gt;ptGeom&lt;/SPAN&gt; = [arcpy.Geometry (&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"POINT"&lt;/SPAN&gt;, pt, sr)]
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;if not &lt;/SPAN&gt;arcpy.Exists (pntFc):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(&lt;SPAN style="background-color: #e4e4ff;"&gt;ptGeom&lt;/SPAN&gt;, pntFc)
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;else&lt;/SPAN&gt;:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; icursor = arcpy.InsertCursor(pntFc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row = icursor.newRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Lat"&lt;/SPAN&gt;, &lt;SPAN style="color: #000080;"&gt;float&lt;/SPAN&gt;(x))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Long"&lt;/SPAN&gt;, &lt;SPAN style="color: #000080;"&gt;float&lt;/SPAN&gt;(y))
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.setValue(&lt;SPAN style="color: #008000; font-weight: bold;"&gt;'Shape'&lt;/SPAN&gt;, &lt;SPAN style="background-color: #e4e4ff;"&gt;ptGeom&lt;/SPAN&gt;)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; icursor.insertRow(row)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="color: #000080; font-weight: bold;"&gt;print &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-weight: bold;"&gt;"Complete"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:35:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463797#M36351</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2021-12-11T20:35:57Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463798#M36352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks a lot Luke for your help! Unfortunately,after using the code you provided, the result is the same as earlier &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/sad.png" /&gt;.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:06:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463798#M36352</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2017-08-24T15:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463799#M36353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In that case I can only assume your if statement is always triggering too, add a print statement to test this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 12px;"&gt;if not &lt;/SPAN&gt;arcpy.Exists (pntFc):
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management(&lt;SPAN style="background-color: #e4e4ff; border: 0px; font-weight: inherit; font-size: 12px;"&gt;ptGeom&lt;/SPAN&gt;, pntFc)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Deleting and replacing existing FC"


&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:36:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463799#M36353</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2021-12-11T20:36:00Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463800#M36354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added the print commend and it was printed &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463800#M36354</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2017-08-24T15:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463801#M36355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I cant tell you why, but you need to try work out why this script does not find the existing data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;pntFc = &lt;SPAN style="color: #008000; border: 0px; font-weight: bold; font-size: 12px;"&gt;r"\\abc\home\xxx\Documents\ArcGIS\treepoints"&lt;/SPAN&gt;&lt;/PRE&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: #000080; border: 0px; font-weight: bold; font-size: 12px;"&gt;if not &lt;/SPAN&gt;arcpy.Exists (pntFc):
&amp;nbsp;&amp;nbsp;&amp;nbsp;print "I cant find the existing data"&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 20:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463801#M36355</guid>
      <dc:creator>LukeWebb</dc:creator>
      <dc:date>2021-12-11T20:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Creating multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463802#M36356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I will need to figure it out &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;. Anyway, thank you for your help and time!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Aug 2017 15:38:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/creating-multiple-points-with-mouse-click/m-p/463802#M36356</guid>
      <dc:creator>PaulinaR</dc:creator>
      <dc:date>2017-08-24T15:38:22Z</dc:date>
    </item>
  </channel>
</rss>

