<?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: Create multiple points with mouse click in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138567#M10833</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14381928585647897 jive_text_macro" data-renderedposition="10.390625_8_912_53" jivemacro_uid="_14381928585647897" modifiedtitle="true"&gt;&lt;OL class="dp-py" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; prow &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; arcpy.da.SearchCursor(point,&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x,y = prow[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;]&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;del&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; prow &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;^ this reads all your rows, one at a time, overwriting the values of x and y each time. So, in the end, you are left with one single pair of coordinates. A SearchCursor is like a for loop that cycles through all records and then stops. If you want to do something for each record in "point", you need to do it within the SearchCursor.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Jul 2015 18:01:08 GMT</pubDate>
    <dc:creator>DarrenWiens2</dc:creator>
    <dc:date>2015-07-29T18:01:08Z</dc:date>
    <item>
      <title>Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138554#M10820</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to be able to click multiple locations and create points where i click and populate each points x, y. i have the current code but only creates one point, so i needs help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;current code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#import modules&amp;nbsp; 
import arcpy&amp;nbsp; 

arcpy.env.qualifiedFieldNames = False
An = "AnimalSightings" #target point feature class Animal Sightings

mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
df = arcpy.mapping.ListDataFrames(mxd)[0]&amp;nbsp; 
dfsr = df.spatialReference&amp;nbsp; 
fcsr = arcpy.Describe(An).spatialReference&amp;nbsp; 
if dfsr.name == fcsr.name:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Now do your work"""&amp;nbsp; 

point = arcpy.GetParameterAsText(0)&amp;nbsp; #click

&amp;nbsp; 
for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; x,y = prow[0]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
del prow&amp;nbsp; 


row_value = [x,y,(x,y)]&amp;nbsp; 
with arcpy.da.InsertCursor(An,('POINT_X', 'POINT_Y','SHAPE@XY')) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow(row_value)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138554#M10820</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T07:40:29Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138555#M10821</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You first need to nest every thing under your if statement you'll be able to tell by the indentation &lt;/P&gt;&lt;P&gt;Then move line 19 below line 24 and nest everything 19 - 24 under the for statement. del prow should be aligned with the for statement be careful and watch your indentation it's important in python&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Jul 2015 17:36:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138555#M10821</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-24T17:36:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138556#M10822</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Like so?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#import modules&amp;nbsp; 
import arcpy&amp;nbsp; 

arcpy.env.qualifiedFieldNames = False
An = "AnimalSightings" #target point feature class Animal Sightings

mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
df = arcpy.mapping.ListDataFrames(mxd)[0]&amp;nbsp; 
dfsr = df.spatialReference&amp;nbsp; 
fcsr = arcpy.Describe(An).spatialReference&amp;nbsp; 
if dfsr.name == fcsr.name:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Now do your work"""&amp;nbsp; 

point = arcpy.GetParameterAsText(0)&amp;nbsp; #click
pointCount = int(arcpy.GetCount_management(point).getOutput(0))

if&amp;nbsp; pointCount &amp;gt;= 1:
&amp;nbsp;&amp;nbsp;&amp;nbsp; for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):&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; x,y = prow[0]&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_value = [x,y,(x,y)]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.InsertCursor(An,('POINT_X', 'POINT_Y','SHAPE@XY')) as cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow(row_value)
del prow &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138556#M10822</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T07:40:31Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138557#M10823</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try to use the code below as a guide.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;if sr == sr:
&amp;nbsp;&amp;nbsp;&amp;nbsp; point = arcpy.GetParameterAsText(0)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for prow in SC:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x,y
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row_value =
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.insertCursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; cursor.insertRow()
&amp;nbsp;&amp;nbsp;&amp;nbsp; delprow&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138557#M10823</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2021-12-11T07:40:34Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138558#M10824</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Were you able to get your code formatted correctly?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jul 2015 14:39:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138558#M10824</guid>
      <dc:creator>WesMiller</dc:creator>
      <dc:date>2015-07-25T14:39:08Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138559#M10825</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, i was out for the weekend.&lt;/P&gt;&lt;P&gt;I was not able to get the code to allow me to create multiple points.&lt;/P&gt;&lt;P&gt;i a not sure what if sr ==sr: is doing other then comparing two values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 14:48:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138559#M10825</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-07-27T14:48:07Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138560#M10826</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry, i was out for the weekend.&lt;/P&gt;&lt;P&gt;I was not able to get the code to allow me to create multiple points.&lt;/P&gt;&lt;P&gt;i a not sure what if sr ==sr: is doing other then comparing two values.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jul 2015 16:05:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138560#M10826</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-07-27T16:05:30Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138561#M10827</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm not sure if you've got this figured out by now, but here is generally how you can add multiple points from a feature set to a feature class:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

point = arcpy.GetParameterAsText(0) # the feature set (or in-memory fc)

pointFC = r'C:/junk/points.shp' # the on-disk fc

insCursor = arcpy.da.InsertCursor(pointFC,'SHAPE@XY') # create insert cursor

with arcpy.da.SearchCursor(point,'SHAPE@XY') as cursor: # loop through feature set
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) # insert row

del insCursor # delete insert cursor&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Of course, you could just as easily run the Append tool rather than using cursors, but I assume you have a specific reason for going into this detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138561#M10827</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:40:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138562#M10828</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interesting. so if i wanted to populate the POINT_X and POINT_Y how would i do that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am having no luck, i am getting error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "C:\GIS\Python\AddPoint\AddPoint_4.py", line 23, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = centroid.x&lt;/P&gt;&lt;P&gt;NameError: name 'centroid' is not defined&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#import modules&amp;nbsp; 
import arcpy&amp;nbsp; 

arcpy.env.qualifiedFieldNames = False
pointFC = "AnimalSightings" #target point feature class Animal Sightings

mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
df = arcpy.mapping.ListDataFrames(mxd)[0]&amp;nbsp; 
dfsr = df.spatialReference&amp;nbsp; 
fcsr = arcpy.Describe(pointFC).spatialReference&amp;nbsp; 
if dfsr.name == fcsr.name:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Now do your work"""&amp;nbsp; 

point = arcpy.GetParameterAsText(0)&amp;nbsp; #click
for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):&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; x,y = prow[0]
del prow&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

insCursor = arcpy.da.InsertCursor(pointFC,('POINT_X','POINT_Y','SHAPE@XY')) # create insert cursor&amp;nbsp; 

with arcpy.da.SearchCursor(point,('POINT_X','POINT_Y','SHAPE@XY')) as cursor: # loop through feature set&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = centroid.x
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[1] = centroid.y
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) # insert row&amp;nbsp; 
&amp;nbsp; 
del insCursor # delete insert cursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138562#M10828</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T07:40:39Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138563#M10829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&lt;SPAN style="font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;NameError: name 'centroid' is not defined&lt;/SPAN&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;^ means there is no variable yet defined as "centroid". This "centroid" thing you are looking for is a property of a &lt;A href="https://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/pointgeometry.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;PointGeometry&lt;/A&gt;. A PointGeometry's centroid is a &lt;A href="https://desktop.arcgis.com/en/desktop/latest/analyze/arcpy-classes/point.htm" rel="nofollow noopener noreferrer" target="_blank"&gt;Point&lt;/A&gt;, which has properties 'X' and 'Y'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using SHAPE@XY:&lt;/P&gt;&lt;P&gt;This returns an x,y tuple, not a geometry object. You can create a Point from this tuple like so:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;point = arcpy.Point(row[2][0],row[2][1])
print point.X
print point.Y&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using SHAPE@:&lt;/P&gt;&lt;P&gt;This returns the geometry itself, so if you are reading points, row[2] will be a point object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138563#M10829</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:40:42Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138564#M10830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Darren i am still confused on how to incorporate what you suggested into my code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;this is what i currently have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;#import modules&amp;nbsp; 
import arcpy&amp;nbsp; 

arcpy.env.qualifiedFieldNames = False
pointFC = "Animal Sightings" #target point feature class Animal Sightings

mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
df = arcpy.mapping.ListDataFrames(mxd)[0]&amp;nbsp; 
dfsr = df.spatialReference&amp;nbsp; 
fcsr = arcpy.Describe(pointFC).spatialReference&amp;nbsp; 
if dfsr.name == fcsr.name:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; """Now do your work"""&amp;nbsp; 

point = arcpy.GetParameterAsText(0)&amp;nbsp; #click
for prow in arcpy.da.SearchCursor(point,'SHAPE@XY'):&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; x,y = prow[0]
del prow&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; 
point1 = arcpy.Point(x, y)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
ptGeometry = arcpy.PointGeometry(point1)&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; 
insCursor = arcpy.da.InsertCursor(pointFC,('POINT_X','POINT_Y','SHAPE@XY')) # create insert cursor&amp;nbsp; 

with arcpy.da.SearchCursor(point,('POINT_X','POINT_Y','SHAPE@XY')) as cursor: # loop through feature set&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in cursor: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POINT_X = row[0]&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; POINT_Y = row[1] 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) # insert row&amp;nbsp; 
&amp;nbsp; 
del insCursor # delete insert cursor&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138564#M10830</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2021-12-11T07:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138565#M10831</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;It's tough to help without knowing how it doesn't work - is there an error?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;Your current example assigns values to variables POINT_X and POINT_Y which are never used. However, since your InsertCursor and SearchCursor happen to use the exact same fields, you should be able to use the entire row from the SearchCursor to insert into the InsertCursor.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;insCursor = arcpy.da.InsertCursor(pointFC,(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'POINT_X','POINT_Y','SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;)) &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# create insert cursor&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;with arcpy.da.SearchCursor(point,(&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'POINT_X','POINT_Y','SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;)) as cursor: &lt;/SPAN&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# loop through feature set&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; row &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; cursor:&lt;/SPAN&gt;&lt;/SPAN&gt;
&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; insCursor.insertRow(row) &lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; color: #008200; font-size: 9pt !important; background-color: inherit;"&gt;# insert row &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: #303030; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="comment" style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;Try this. If it doesn't work, reply with error message or explanation how it fails to work.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 07:40:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138565#M10831</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2021-12-11T07:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138566#M10832</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;currently the code runs fine with no error, but the POINT_X &amp;amp; POINT_Y doesn't get populate in the attribute table of the point or points that get created. I would like to create points by using the mouse click and update the x,y of those points that i used the mouse click to create.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the last code i attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks Darren.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 17:44:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138566#M10832</guid>
      <dc:creator>PacoAlverez</dc:creator>
      <dc:date>2015-07-29T17:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: Create multiple points with mouse click</title>
      <link>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138567#M10833</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14381928585647897 jive_text_macro" data-renderedposition="10.390625_8_912_53" jivemacro_uid="_14381928585647897" modifiedtitle="true"&gt;&lt;OL class="dp-py" start="1" style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #5c5c5c; margin-bottom: 1px !important; margin-left: 45px !important;"&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;for&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; prow &lt;/SPAN&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;in&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; arcpy.da.SearchCursor(point,&lt;/SPAN&gt;&lt;SPAN class="string" style="font-weight: inherit; font-style: inherit; color: blue; font-size: 9pt !important; background-color: inherit;"&gt;'SHAPE@XY'&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;):&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; x,y = prow[&lt;SPAN class="number" style="font-weight: inherit; font-style: inherit; color: green; font-size: 9pt !important; background-color: inherit;"&gt;0&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt;]&amp;nbsp; &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; color: black; font-size: 9pt !important; background-color: inherit;"&gt;&lt;SPAN class="keyword" style="font-weight: inherit; font-style: inherit; color: #006699; font-size: 9pt !important; background-color: inherit;"&gt;del&lt;/SPAN&gt;&lt;SPAN style="font-weight: inherit; font-style: inherit; font-size: 9pt !important; background-color: inherit;"&gt; prow &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: inherit; color: black; font-weight: inherit; font-size: 9pt !important; font-style: inherit;"&gt;^ this reads all your rows, one at a time, overwriting the values of x and y each time. So, in the end, you are left with one single pair of coordinates. A SearchCursor is like a for loop that cycles through all records and then stops. If you want to do something for each record in "point", you need to do it within the SearchCursor.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Jul 2015 18:01:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/create-multiple-points-with-mouse-click/m-p/138567#M10833</guid>
      <dc:creator>DarrenWiens2</dc:creator>
      <dc:date>2015-07-29T18:01:08Z</dc:date>
    </item>
  </channel>
</rss>

