<?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: Copy selected features to geodatabase feature class in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688586#M53344</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interesting i am not sure i follow into line 8.5?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 12 Jun 2015 19:27:57 GMT</pubDate>
    <dc:creator>CCWeedcontrol</dc:creator>
    <dc:date>2015-06-12T19:27:57Z</dc:date>
    <item>
      <title>Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688580#M53338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on creating a addon button to update some address points and copy that updated feature. The first part of the code does what it is suppose to do (only update the selected feature) but the second part of the code doesn't do what it is suppose to do and that is copy "only" the selected feature to the file geodatbase feature class. The code runs fine i don't get any errors but the second part of the codes doesn't copy the selected feature. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would also like to an an "if" statement. if there is no feature selected i want it to do nothing or tell me there is nothing selected. if there is something selected i want it to only updates the selected feature and only copy the selected feature. Any ideas?&lt;/P&gt;&lt;P&gt;&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 arcpy, time
import pythonaddins
import os

#populate selected feature 
APT = "TEST"
arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument("CURRENT")
if int(arcpy.GetCount_management(APT).getOutput(0)) &amp;gt; 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(APT)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructType = ("Primary, Private")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Verified = ("Yes, GRM, TA")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Status = ("Active")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructCat = ("Residential")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.APA_CODE = ("1110")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows

#Copies address point to backup address points in filegeodatabase

fc1 = "CCAP"

#Database
workspace = r"C:\GIS\CCAP\CCAP.mdb"
arcpy.env.overwriteOutput = True
# Start an edit session. Must provide the worksapce.
edit = arcpy.da.Editor(workspace)

# Edit session is started without an undo/redo stack for versioned data
#&amp;nbsp; (for second argument, use False for unversioned data)
edit.startEditing(True)

# Start an edit operation
edit.startOperation()

if int(arcpy.GetCount_management(APT).getOutput(0)) &amp;gt; 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(APT, fc1, "NO_TEST")

# Stop the edit operation.
edit.stopOperation()

# Stop the edit session and save the changes
edit.stopEditing(True)

arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:21 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688580#M53338</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T04:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688581#M53339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey there, it's not necessary to be in an edit session to use the append tool. Try this: &lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

#populate selected feature
APT = "TEST"
fc1 = "CCAP"
workspace = r"C:\GIS\CCAP\CCAP.mdb"
arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument("CURRENT")
if int(arcpy.GetCount_management(APT).getOutput(0)) &amp;gt; 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(APT)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructType = ("Primary, Private")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Verified = ("Yes, GRM, TA")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Status = ("Active")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructCat = ("Residential")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.APA_CODE = ("1110")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(APT, fc1, "NO_TEST")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows
&amp;nbsp;&amp;nbsp;&amp;nbsp; elif int(arcpy.GetCount_management(APT).getOutput(0)) == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected"
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688581#M53339</guid>
      <dc:creator>SepheFox</dc:creator>
      <dc:date>2021-12-12T04:58:24Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688582#M53340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am getting an error on &lt;SPAN class="keyword"&gt;elif int(arcpy.GetCount_management(APT).getOutput(&lt;SPAN class="number"&gt;0&lt;/SPAN&gt;)) == &lt;SPAN class="number"&gt;0&lt;/SPAN&gt;:&amp;nbsp; &lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Parsing error SyntaxError: invalid syntax (line 21)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 16:41:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688582#M53340</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-06-12T16:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688583#M53341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Oh yes, I see the mistake. It needs to be indented to the same level as if, and then print statement should be indented level with rows, and refresh view shouldn't be indented.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 17:31:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688583#M53341</guid>
      <dc:creator>SepheFox</dc:creator>
      <dc:date>2015-06-12T17:31:55Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688584#M53342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;after adjusting the indents and when nothing is select and run the code i get the following error on line 18&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Runtime error&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 18, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;NameError: name 'rows' 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 arcpy&amp;nbsp; 
&amp;nbsp; 
#populate selected feature&amp;nbsp; 
APT = "TEST"&amp;nbsp; 
fc1 = "CCAP"&amp;nbsp; 
workspace = r"C:\GIS\CCAP\CCAP.mdb"&amp;nbsp; 
arcpy.env.overwriteOutput = True&amp;nbsp; 
mxd = arcpy.mapping.MapDocument("CURRENT")&amp;nbsp; 
if int(arcpy.GetCount_management(APT).getOutput(0)) &amp;gt; 0:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(APT)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructType = ("Primary, Private")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Verified = ("Yes, GRM, TA")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Status = ("Active")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructCat = ("Residential")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.APA_CODE = ("1110")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(APT, fc1, "NO_TEST")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows&amp;nbsp; 
elif int(arcpy.GetCount_management(APT).getOutput(0)) == 0:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected"&amp;nbsp; 

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With a point selected i don't get any error. The "TEST" point that is selected does the fields updated but nothing is copied to the "CCAP" feature class.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688584#M53342</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T04:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688585#M53343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;your cursor needs to be outside the​ if statement (into line 8.5) because it is undefined if the count is 0 and goes to the 'else' portion of the if-else&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 18:56:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688585#M53343</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-12T18:56:44Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688586#M53344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;interesting i am not sure i follow into line 8.5?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 19:27:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688586#M53344</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-06-12T19:27:57Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688587#M53345</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;​hmmmmm maybe between line 8 and 9 &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/silly.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 19:35:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688587#M53345</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-12T19:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688588#M53346</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That is what i thought you meant but just making sure.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;having nothing selected i still get the error&lt;/P&gt;&lt;P&gt;"Runtime error &lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;/P&gt;&lt;P&gt;&amp;nbsp; File "&amp;lt;string&amp;gt;", line 18, in &amp;lt;module&amp;gt;&lt;/P&gt;&lt;P&gt;NameError: name 'rows' is not defined"&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 arcpy&amp;nbsp; 
&amp;nbsp; 
#populate selected feature&amp;nbsp; 
APT = "TEST"&amp;nbsp; 
fc1 = "CCAP"&amp;nbsp; 
workspace = r"C:\GIS\CCAP\CCAP.mdb"&amp;nbsp; 
arcpy.env.overwriteOutput = True&amp;nbsp; 
mxd = arcpy.mapping.MapDocument("CURRENT")
rows = arcpy.UpdateCursor(APT)
for row in rows: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; if int(arcpy.GetCount_management(APT).getOutput(0)) &amp;gt; 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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")&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.StructType = ("Primary, Private")&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.Verified = ("Yes, GRM, TA")&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.Status = ("Active")&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.StructCat = ("Residential")&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.APA_CODE = ("1110")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(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; arcpy.Append_management(APT, fc1, "NO_TEST")&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; elif int(arcpy.GetCount_management(APT).getOutput(0)) == 0:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected"&amp;nbsp; 

&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am i not doing something correct? Am i going about this the best way?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688588#M53346</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T04:58:29Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688589#M53347</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;​well line 20 is not right...rows gets deleted the first time throw the cursor... move that row completely outside of the for row in rows loop or comment it out for testing ie&lt;/P&gt;&lt;P&gt;# del row,rows&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 21:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688589#M53347</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2015-06-12T21:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688590#M53348</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I deleted line 20, ran the current code with one point selected and it updated the selected point for APT but still did not copy the feature to "CCAP".&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If nothing is selected and i run it it keeps repeating the process the process indicator goes from 0 to 100 and then refreshes results. I have to terminate arcmap through task manager.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe i am not going about this the right way? is there a batter way to do what i am trying to do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 22:13:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688590#M53348</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-06-12T22:13:18Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688591#M53349</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Append Management has a bug that won't refresh until you do things like manually remove the entire layer from the map and add it back.&amp;nbsp; You may find that you have a huge number of copies of the record created if you do that.&amp;nbsp; It does not respond to any refresh code when used in a script.&amp;nbsp; I got no help from esri support on the subject and had to abandon a tool I was developing based on using the Append tool in an interactive process.&amp;nbsp; It only works if the script is standalone and never needs to refresh an active ArcMap session.&amp;nbsp; I would consider using an insert cursor instead, although I seem to recall that it also has some quirks when trying to do a refresh in an interactive ArcMap session.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think esri filed a bug report.&amp;nbsp; You may want to let support know that you also expected the Append tool to work in an interactive scripted workflow, and that the inability to refresh the tool's output makes it useless for that purpose.&amp;nbsp; If they don't intend to fix it they need to document this behavior to avoid wasting our time developing tools that logically should work, but really won't if the user can only tell that the tool has actually altered the table by doing an unscripted manual set of actions after our scripts complete.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I just reviewed my e-mails to esri support on the subject and see that they did not actually classify this behavior as a bug, but instead that the behavior you and I expect is an "enhancement".&amp;nbsp; Here is what they said in April of 2014:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;"After testing this behavior, I have logged an enhancement on your behalf to document this. The reference number and subject line for this enhancement is as follows: &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;[#NIM100778&amp;nbsp; Ability to refresh the attribute table automatically after running the append tool when the target attribute table is already open. ]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;This enhancement will now be reviewed by our development team, and they will take further action as necessary to address this issues as soon as possible. For updates on this enhancement, please see the My Support portal at &lt;/SPAN&gt;&lt;A class="jive-link-external-small" href="http://support.esri.com" rel="nofollow" target="_blank"&gt;http://support.esri.com&lt;/A&gt;&lt;SPAN&gt; or contact Esri Support Services"&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I believe my original incident report only focused on the in ability to refresh a Standalone Table.&amp;nbsp; It may not have covered feature classes and the behavior of the Append tool in connection with refreshing the map view, so the NIM probably needs to be expanded.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 12 Jun 2015 22:21:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688591#M53349</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2015-06-12T22:21:25Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688592#M53350</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Going back to my original code, i made some modifications. It seems to some what run to my needs. my python skills are not so great.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I changed line 26 on my original post from, &lt;SPAN class="attribute"&gt;workspace = r&lt;SPAN class="attribute-value"&gt;"C:\GIS\CCAP\CCAP.mdb"&lt;/SPAN&gt;&amp;nbsp; to arcpy.env.workspace = &lt;SPAN class="attribute"&gt;r&lt;SPAN class="attribute-value"&gt;"C:\GIS\CCAP\CCAP.mdb".&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;After that change the Append Management works and even refreshed fine. The only issue is that it takes 1 min to copy just one point from one layer to the other. The other thing is that i need so some times select 1 or 50 points at a time and run this scrip\tool, but i do not know how set that part up. any help would be great. Currently it can only run against one point.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;Current code.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

APT = "TEST" 
fc1 = "CCAP"
arcpy.env.workspace = r"C:\GIS\CCAP\CCAP_Copy_NEW.gdb"

arcpy.env.overwriteOutput = True
mxd = arcpy.mapping.MapDocument("CURRENT")

#Fill in attributes on point layer
Pointcount = int(arcpy.GetCount_management(APT).getOutput(0))
if 0 &amp;lt; Pointcount &amp;lt; 2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(APT)
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructType = ("Primary, Private")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Verified = ("Yes, GRM, TA")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Status = ("Active")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructCat = ("Residential")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.APA_CODE = ("1110")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows
else:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Handle Exception&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No features selected."&amp;nbsp;&amp;nbsp;&amp;nbsp; 

#Check to make sure user had at least one point is selected.
#If point selected Copy to back up point layer.
parcelsCount2 = int(arcpy.GetCount_management(APT).getOutput(0))&amp;nbsp; 
if 0 &amp;lt; parcelsCount2 &amp;lt; 2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Append_management(APT, fc1, "NO_TEST")
else:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Handle Exception&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "No features selected."&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

arcpy.RefreshActiveView()
&lt;/PRE&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;Richard you mentioned insert cursor, do have any similar code available as to what i am trying to accomplish? i would be gratefully appreciative... I am not the greatest python writer. &lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute-value"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688592#M53350</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T04:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688593#M53351</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just tried the insert cursor with a standaline table and it appears to have the same problem as the append tool.&amp;nbsp; It is inserting the records, but if the table view is open, the user will not see the records they just inserted until they manually close and then reopen the table view.&amp;nbsp; That makes interactive automation impossible, since most users would just assume the insert failed if they don't see any new records.&amp;nbsp; Training them to close and reopen the table view to show that the tool worked is not a good tool design.&amp;nbsp; There is no way to use arcpy to automatically close and reopen the table view as far as I can see or to get the table view cache to refresh.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your code is slow because you are not using arcpy.da cursors.&amp;nbsp; The old cursors are useless.&amp;nbsp; Lookup the arcpy.da.update cursor syntax in the help and rewrite your code to use that type of cursor.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The only reason this only works for one point is that you added code to restrict it to only copy 1 point (&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;if 0 &lt;/SPAN&gt;&lt;SPAN class="tag" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;SPAN class="tag-name" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;parcelsCount2&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;SPAN class="tag" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;SPAN class="tag-name" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;2:&lt;/SPAN&gt; means only 1 point.&amp;nbsp; At least 1 point would be &lt;SPAN class="tag-name" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;&lt;SPAN style="color: #000000; font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px; background-color: #f6f6f6;"&gt;if 0 &lt;/SPAN&gt;&lt;SPAN class="tag" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #000000; background-color: #f6f6f6;"&gt; &lt;/SPAN&gt;&lt;SPAN class="tag-name" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;parcelsCount2&lt;/SPAN&gt;&lt;SPAN class="tag-name" style="font-weight: bold; font-size: 12px; font-family: Consolas, 'Courier New', Courier, mono, serif; color: #006699; background-color: #f6f6f6;"&gt;:&lt;/SPAN&gt;)&lt;/SPAN&gt;.&amp;nbsp; The append tool is not limited to copying a single point.&amp;nbsp; If you want one point per each feature class, then that is another matter, but why would you need that?&amp;nbsp; It is backed up whether there is one point or 50 points in your backup layer.&amp;nbsp; Anyway, I don't think you have clearly explained what you want to do with the 1 to 50 points with your code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jun 2015 18:49:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688593#M53351</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2015-06-24T18:49:14Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688594#M53352</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The purpose of this script/tool would be that i can select one or two or 50 points at once and update just those selected points with the info in the &lt;SPAN class="attribute"&gt;rows = &lt;SPAN class="attribute-value"&gt;arcpy&lt;/SPAN&gt;.UpdateCursor(APT). Then take those selected points and copy them to a different personal/filedatabase but with the info that was updated in the &lt;SPAN class="attribute"&gt;rows = &lt;SPAN class="attribute-value"&gt;arcpy&lt;/SPAN&gt;.UpdateCursor(APT) and other fields. I have tried to implementing your suggestion on insert cursor and i have been able to create a point with insertcursor but it seems as the arcpy.da.UpdateCursor is still very slow. takes about 2-4 minutes to add one point to the backup data base. sometimes after testing and testing it takes 20 mins... weird The insertcursor is superfast it's the and arcpy.update cursor and arcpy.da.UpdateCursor that are super slow. Maybe i am not doing it the most efficient way...&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;apologies my code is a little mangled&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
from datetime import datetime as d
startTime = d.now()

#set to folder where features are located
arcpy.env.workspace = r"C:\CCAP_Copy_NEW.gdb" #on windows use \ instead of /
arcpy.env.overwriteOutput = True
FC = "test"
#---------------------------
#define variables for cursor
#---------------------------

rows = arcpy.SearchCursor(FC)
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = row.Shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; X = geom.centroid.X
&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = geom.centroid.Y
del rows

incidentsFC = "CCAP"

# Create point
inPoint = arcpy.PointGeometry(arcpy.Point(X,Y))

#Check to make sure user had at least one point is selected.&amp;nbsp; 
parcelsCount = int(arcpy.GetCount_management(FC).getOutput(0))&amp;nbsp; 


"""SEARCHCURSOR"""
stable = "test"
sfield = ["ACCOUNT","SiteNum","OwnerName","SiteAddres","SiteNumSfx","SiteStreet","Predir"]
#where clause will be written in SQL and not assigned to variable


"""UPDATECURSOR"""
utable = "CCAP"
ufield = ["ACCOUNT","SiteNum","OwnerName","SiteAddres","SiteNumSfx","SiteStreet","Predir"]
#where clause will be written in SQL and not assigned to variable

#Check to make sure user had at least one point is selected.&amp;nbsp;&amp;nbsp;&amp;nbsp; 
dsc = arcpy.Describe(FC)
dsc = arcpy.Describe(stable)&amp;nbsp; 
&amp;nbsp; 
selection_set = dsc.FIDSet&amp;nbsp; 
if len(selection_set) == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected"

#--------------------------
#start the loop
#--------------------------
elif parcelsCount &amp;gt;= 1: 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(FC)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")&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.StructType = ("Primary, Private")&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.Verified = ("Yes, GRM, TA")&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.Status = ("Active")&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.StructCat = ("Residential")&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.APA_CODE = ("1110")&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; rows.updateRow(row)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; del row, rows&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; #arcpy.Append_management(APT, fc1, "NO_TEST") 

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create the insert cursor and a new empty row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowInserter = arcpy.InsertCursor(incidentsFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newIncident = rowInserter.newRow()

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; # Populate attributes of new row
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; newIncident.SHAPE = inPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #newIncident.setValue(descriptionField, inDescription)
&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; # Insert the new row into the shapefile
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowInserter.insertRow(newIncident)# Handle Exception
&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; del rowInserter

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(stable, sfield) as scursor: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for srow in scursor:
&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; print srow
&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; with arcpy.da.UpdateCursor(utable, ufield) as ucursor: 
&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; for urow in ucursor:
&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ucursor.updateRow(srow)
arcpy.RefreshActiveView()&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print '(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')'

except Exception, e:
&amp;nbsp;&amp;nbsp;&amp;nbsp; # If an error occurred, print line number and error message
&amp;nbsp;&amp;nbsp;&amp;nbsp; import traceback, sys
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2]
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Line %i" % tb.tb_lineno
&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="attribute"&gt;&lt;SPAN class="attribute"&gt;arcpy.da.UpdateCursor&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;rows = arcpy.SearchCursor(FC)
for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp; geom = row.Shape
&amp;nbsp;&amp;nbsp;&amp;nbsp; X = geom.centroid.X
&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = geom.centroid.Y
del rows

incidentsFC = "CCAP"

# Create point
inPoint = arcpy.PointGeometry(arcpy.Point(X,Y))

#Check to make sure user had at least one point is selected.&amp;nbsp; 
parcelsCount = int(arcpy.GetCount_management(FC).getOutput(0))&amp;nbsp; 
dsc = arcpy.Describe(FC)&amp;nbsp; 
&amp;nbsp; 
selection_set = dsc.FIDSet&amp;nbsp; 
if len(selection_set) == 0:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected"
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
elif parcelsCount &amp;gt;= 1:&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows = arcpy.UpdateCursor(FC)&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows:
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.FacltyType = ("Single Family Home")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructType = ("Primary, Private")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Verified = ("Yes, GRM, TA")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.Status = ("Active")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.StructCat = ("Residential")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row.APA_CODE = ("1110")&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(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; #arcpy.Append_management(APT, fc1, "NO_TEST") 

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Create the insert cursor and a new empty row
&amp;nbsp;&amp;nbsp;&amp;nbsp; rowInserter = arcpy.InsertCursor(incidentsFC)
&amp;nbsp;&amp;nbsp;&amp;nbsp; newIncident = rowInserter.newRow()

&amp;nbsp;&amp;nbsp;&amp;nbsp; # Populate attributes of new row
&amp;nbsp;&amp;nbsp;&amp;nbsp; newIncident.SHAPE = inPoint
&amp;nbsp;&amp;nbsp;&amp;nbsp; #newIncident.setValue(descriptionField, inDescription)
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # Insert the new row into the shapefile
&amp;nbsp;&amp;nbsp;&amp;nbsp; rowInserter.insertRow(newIncident)# Handle Exception&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; #print "No features selected." 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rowInserter

&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.SearchCursor(FC, ['ACCOUNT', 'SiteStreet']) as parcelCursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for parcelRow in parcelCursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT = parcelRow[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; SiteStreet = parcelRow[1]

&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(incidentsFC, ['Account', 'SiteStreet']) as addressCursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for addressRow in addressCursor:&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addressRow[0] = ACCOUNT&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addressRow[1] = SiteStreet&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; addressCursor.updateRow(addressRow)&amp;nbsp; &lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688594#M53352</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2021-12-12T04:58:34Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688595#M53353</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The cursor is not to blame.&amp;nbsp; You either have a corrupt fgdb, fc, or a bad install of ArcMap.&amp;nbsp; If you have tech support available to you, then after creating a new fgdb and testing that, then if the speed problem is fixed call them.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 03:54:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688595#M53353</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2015-06-25T03:54:22Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688596#M53354</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Richard you were correct my fgdb were corrupted, thanks. I deleted and recreated them and the cursor ran FAST.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Although i still have an issue. When I select one record and run either codes from above it creates the point to the backup database, but it updates the fields of all the points in the backup database with the same attribute info as the selected point. I only want it to back up and update the selected points only. I also tried selected two or more points but only creates one point on the backup database and it also updates every point as well. What adjustments do i need to make to my code to only copy and update the selected points?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 17:19:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688596#M53354</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-06-25T17:19:15Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688597#M53355</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You also need to use the da insert cursor in your code in addition to the Search or Update cursors.&amp;nbsp; Create a list variable and append the objectIDs returned by the InsertRow method.&amp;nbsp; Then use that list to build an expression ot only update points with those objectIDs, either using python logic or SQL.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OIDList = []&lt;/P&gt;&lt;P&gt;...&amp;nbsp; Set up insert cursor&lt;/P&gt;&lt;P&gt;OIDList.append(cursor.InsertRow(row))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# use this for an update cursor's SQL where clause&lt;/P&gt;&lt;P&gt;whereclause = 'OBJECTID IN (' + ', '.join(OIDList) + ')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If each point is individually attributed then create a dictionary that uses the ObjectIDs returned by the InsertRow method as the key and store a list of attributes as the dictionary value for the key.&amp;nbsp; Then use the dictionaries keys as the join list.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OIDDict = {}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OID = cursor.InsertRow(row)&lt;/P&gt;&lt;P&gt;OIDDict[OID] = [fieldAttribute1, fieldAttribute2, fieldAttribute3]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# use this for an update cursor's SQL where clause&lt;/P&gt;&lt;P&gt;whereclause = 'OBJECTID IN (' + ', '.join(OIDDict.keys()) + ')'&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Assume first field is OBJECTID&lt;/P&gt;&lt;P&gt;OID = row[0]&lt;/P&gt;&lt;P&gt;row[1] = OIDDict[OID][0]&lt;/P&gt;&lt;P&gt;row[2] = OIDDict[OID][1]&lt;/P&gt;&lt;P&gt;row[3] = OIDDict[OID][2]&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 17:33:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688597#M53355</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2015-06-25T17:33:17Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688598#M53356</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the reply Richard, i am not familiar with dictionaries and lists so am unable to incorporate your suggestions to my code.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jun 2015 20:39:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688598#M53356</guid>
      <dc:creator>CCWeedcontrol</dc:creator>
      <dc:date>2015-06-25T20:39:44Z</dc:date>
    </item>
    <item>
      <title>Re: Copy selected features to geodatabase feature class</title>
      <link>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688599#M53357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After looking more carefully at your code you are opening way too many cursors on the same data.&amp;nbsp; Based on how I read what your code is actually doing, you only need one UpdateCursor and one InsertCursor as shown below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy 
from datetime import datetime as d 
startTime = d.now() 

#set to folder where features are located 
arcpy.env.workspace = r"C:\CCAP_Copy_NEW.gdb" #on windows use \ instead of / 
arcpy.env.overwriteOutput = True 
#--------------------------- 
#define variables for cursor 
#--------------------------- 
FC = "test" 
incidentsFC = "CCAP" 

dsc = arcpy.Describe(FC)&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp; 
rowInserter = arcpy.da.InsertCursor(incidentsFC, ["SHAPE@", 'Account', 'SiteStreet'])

selection_set = dsc.FIDSet&amp;nbsp;&amp;nbsp; 
if len(selection_set) == 0: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "There are no features selected" 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
elif parcelsCount &amp;gt;= 1:&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 
&amp;nbsp;&amp;nbsp;&amp;nbsp; with arcpy.da.UpdateCursor(FC, ["FacltyType", "StructType", 'Verified", "Status", "StructCat", "APA_CODE", "ACCOUNT", 'SiteStreet', 'SHAPE@X', 'SHAPE@Y']) as rows
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; for row in rows: 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; row[0] = ("Single Family Home")&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[1] = ("Primary, Private")&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[2] = ("Yes, GRM, TA")&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[3] = ("Active")&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[4] = ("Residential")&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[5] = ("1110")
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ACCOUNT = row[6]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; SiteStreet = row[7]&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; X = row[8]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Y = row[9]
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rows.updateRow(row)

&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; inPoint = arcpy.PointGeometry(arcpy.Point(X,Y)) 
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; rowInserter.insertRow((inPoint, ACCOUNT, SiteStreet))
&amp;nbsp;&amp;nbsp;&amp;nbsp; del row
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rows 
&amp;nbsp;&amp;nbsp;&amp;nbsp; del rowInserter

&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()&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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 

try:
&amp;nbsp;&amp;nbsp;&amp;nbsp; print '(Elapsed time: ' + str(d.now() - startTime)[:-3] + ')' 

except Exception, e: 
&amp;nbsp;&amp;nbsp;&amp;nbsp; # If an error occurred, print line number and error message 
&amp;nbsp;&amp;nbsp;&amp;nbsp; import traceback, sys 
&amp;nbsp;&amp;nbsp;&amp;nbsp; tb = sys.exc_info()[2] 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print "Line %i" % tb.tb_lineno 
&amp;nbsp;&amp;nbsp;&amp;nbsp; print e.message&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:58:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/copy-selected-features-to-geodatabase-feature/m-p/688599#M53357</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-12T04:58:37Z</dc:date>
    </item>
  </channel>
</rss>

