<?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: cut &amp;amp; paste annotations in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666770#M51765</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have a suggestion on how to fix the CopyFeatures_management statement?&amp;nbsp; The input and outputs are specified.&amp;nbsp; What else is missing?&amp;nbsp; Also, I am using Feature Classes instead of layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Sep 2013 11:59:36 GMT</pubDate>
    <dc:creator>MikeYoung5</dc:creator>
    <dc:date>2013-09-09T11:59:36Z</dc:date>
    <item>
      <title>cut &amp;amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666767#M51762</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Can Python be used to cut &amp;amp; paste Annotations?&amp;nbsp; I have read through arcpy.CopyFeatures_management and arcpy.Copy_management ESRI help docs.&amp;nbsp; I have been unable to find anything that mentions cut &amp;amp; paste Annotations.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 12:39:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666767#M51762</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-06T12:39:29Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666768#M51763</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;What do you mean by "cut &amp;amp; paste annotations"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copy Features respects feature selections on layers....&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 17:53:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666768#M51763</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-09-06T17:53:08Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666769#M51764</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;What do you mean by "cut &amp;amp; paste annotations"?&lt;BR /&gt;Copy Features respects feature selections on layers....&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to cut and paste from one annotation layer to another.&amp;nbsp; Basically, I want the same functionality as the cut &amp;amp; paste buttons from the standard toolbar.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument ("CURRENT") &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames (mxd)[0] &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(pa.name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.AddMessage(oa.name)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa, oa)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An ExecuteError is thrown.&amp;nbsp; ExecuteError: Failed to execute.&amp;nbsp; Parameters are not valid.&amp;nbsp; ERROR 840: The value is not a Feature Class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Sep 2013 17:58:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666769#M51764</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-06T17:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666770#M51765</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Does anyone have a suggestion on how to fix the CopyFeatures_management statement?&amp;nbsp; The input and outputs are specified.&amp;nbsp; What else is missing?&amp;nbsp; Also, I am using Feature Classes instead of layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 11:59:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666770#M51765</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-09T11:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666771#M51766</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;The output of CopyFeatures is a feature class, not a layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;oa is a layer, not a Feature Class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 14:44:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666771#M51766</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-09-09T14:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666772#M51767</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The output of CopyFeatures is a feature class, not a layer.&lt;BR /&gt;&lt;BR /&gt;oa is a layer, not a Feature Class.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;How is oa not a Feature Class?&amp;nbsp; ArcCatalog and&amp;nbsp; ArcMap list the Data Type as a File Geodatabase Feature Class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 14:49:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666772#M51767</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-09T14:49:45Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666773#M51768</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Mark,&lt;BR /&gt;&lt;BR /&gt;How is oa not a Feature Class?&amp;nbsp; ArcCatalog and&amp;nbsp; ArcMap list the Data Type as a File Geodatabase Feature Class.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The feature layer at its core is a feature class, but the layer itself is on top of that and is a Desktop display wrapper that defines its output location as a layer designed for placement in a map dataframe, not as a feature class file in a directory.&amp;nbsp; This geoprocessing tool cannot use the layer wrapper that hides the feature class information from the tool.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is why when you interactively complete the tool you cannot drag a layer into the output text box of the CopyFeatures tool or type a layer name into the output of the tool.&amp;nbsp; You have to navigate directories to fill in that part of the tool dialog with a full feature class path or you must only connect raw feature class variables or tool outputs that store direct pointers to a feature class path.&amp;nbsp; Layers are only an indirect pointer to a feature class, not a direct pointer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Although many people use the term layer indiscriminately to refer to both what you see in the TOC of a Desktop map and the underlying data in ArcCatalog, technically the term is actually only correctly used to refer to what you see in a Desktop map TOC.&amp;nbsp; The data stored on disk seen in ArcCatalog is only a feature class that has its own independent existence even if it was never used to create a layer in a Desktop map TOC.&amp;nbsp; Likewise, layers can exist without a feature class (when a layer has a red exclamation mark due to a lost data connection it is still a layer even though it has no feature class and virtually no real functionality).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 16:14:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666773#M51768</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-09-09T16:14:10Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666774#M51769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;The feature layer at its core is a feature class, but the layer itself is on top of that and is a Desktop display wrapper that defines its output location as a layer designed for placement in a map dataframe, not as a feature class file in a directory.&amp;nbsp; This geoprocessing tool cannot use the layer wrapper that hides the feature class information from the tool.&lt;BR /&gt;&lt;BR /&gt;That is why when you interactively complete the tool you cannot drag a layer into the output text box of the CopyFeatures tool or type a layer name into the output of the tool.&amp;nbsp; You have to navigate directories to fill in that part of the tool dialog with a full feature class path or you must only connect raw feature class variables or tool outputs that store direct pointers to a feature class path.&amp;nbsp; Layers are only an indirect pointer to a feature class, not a direct pointer.&lt;BR /&gt;&lt;BR /&gt;Although many people use the term layer indiscriminately to refer to both what you see in the TOC of a Desktop map and the underlying data in ArcCatalog, technically the term is actually only correctly used to refer to what you see in a Desktop map TOC.&amp;nbsp; The data stored on disk seen in ArcCatalog is only a feature class that has its own independent existence even if it was never used to create a layer in a Desktop map TOC.&amp;nbsp; Likewise, layers can exist without a feature class (when a layer has a red exclamation mark due to a lost data connection it is still a layer even though it has no feature class and virtually no real functionality).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Layers can refer to anything with the ArcMap TOC (as you mention) and files with the .lyr extension.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your logic makes sense.&amp;nbsp; For a tool to run, the input and output folder locations are required.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Therefore, once the environment is set, an error is still returned saying pa does not exist or is not supported.&amp;nbsp; Only one environment is set, since the input and output locations are the same, and the file names remain the same(both are stored within the same File Geodatabase).&amp;nbsp; Is the issue with overwriting the output file?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Sep 2013 16:47:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666774#M51769</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-09T16:47:25Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666775#M51770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am confused as to why the script does not work.&amp;nbsp; I believe something is wrong my CopyFeatures_management statement. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

arcpy.env.workSpace = "C:\Working\MyData\Python.gdb"
arcpy.env.overwriteOutput = 'True'

mxd = arcpy.mapping.MapDocument ("CURRENT") 
df = arcpy.mapping.ListDataFrames (mxd)[0] 
pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]
oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]
arcpy.AddMessage(pa.name)
arcpy.AddMessage(oa.name)

arcpy.CopyFeatures_management("pa", "oa")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yet, if I write a basic script the CopyFeatures_management works.&amp;nbsp; I only want to copy selected features &amp;amp; paste into an existing Feature Class, not create a new Feature Class. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = "C:\Working\MyData\Python.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management("HomeValue", "Test")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;except:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:10:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666775#M51770</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2021-12-12T04:10:53Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666776#M51771</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;pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; pa is the input: it is a layer in arcMap. 
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copy Features accepts a layer as input, 
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so you can have selected or query defined subsets of the FC features

oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; oa is supposed to be the output: it is a layer in arcMap. 
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Copy Features cannot accept a layer as output; it must write to a fc on disc
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; since the oa layer is in your open ArcMap session, the underlying FC is locked
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; so you cannot write to the underlyng FC either

fc = r"C:\Working\MyData\Python.gdb\AnAnnotationFC"
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; fc is an annotation FC in the same gdb, but is NOT in the open mxd
#&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try writing to that


arcpy.CopyFeatures_management(pa, fc)&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:10:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666776#M51771</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2021-12-12T04:10:56Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666777#M51772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I am confused as to why the script does not work.&amp;nbsp; I believe something is wrong my CopyFeatures_management statement. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy

arcpy.env.workSpace = "C:\Working\MyData\Python.gdb"
arcpy.env.overwriteOutput = 'True'

mxd = arcpy.mapping.MapDocument ("CURRENT") 
df = arcpy.mapping.ListDataFrames (mxd)[0] 
pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]
oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]
arcpy.AddMessage(pa.name)
arcpy.AddMessage(oa.name)

arcpy.CopyFeatures_management("pa", "oa")&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;Yet, if I write a basic script the CopyFeatures_management works.&amp;nbsp; I only want to copy selected features &amp;amp; paste into an existing Feature Class, not create a new Feature Class. &lt;BR /&gt;&lt;BR /&gt;import arcpy&lt;BR /&gt;try:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.env.workspace = "C:\Working\MyData\Python.gdb"&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.CopyFeatures_management("HomeValue", "Test")&lt;BR /&gt;except:&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages()&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It doesn't work because you are telling the CopyFeatures_management to use the literal strings "pa" and "oa", which are not the names of any layers.&amp;nbsp; Unquote those variables and possibly use the .name property as you did in the messages.&amp;nbsp; So try either:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa, oa)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or try&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa.name, oa.name)&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 04:10:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666777#M51772</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2021-12-12T04:10:59Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666778#M51773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It doesn't work because you are telling the CopyFeatures_management to use the literal strings "pa" and "oa", which are not the names of any layers.&amp;nbsp; Unquote those variables and possibly use the .name property as you did in the messages.&amp;nbsp; So try either:&lt;BR /&gt;&lt;BR /&gt;arcpy.CopyFeatures_management(pa, oa)&lt;BR /&gt;&lt;BR /&gt;or try&lt;BR /&gt;&lt;BR /&gt;arcpy.CopyFeatures_management(pa.name, oa.name)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have tested each of the suggestions multiple times and my results were unsuccessful.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa, oa) approach returns the Error 840: The value is not a Feature Class.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa.name, oa.name approach runs but does not work.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;But, arcpy.env.workspace = "C:\Working\MyData\Python.gdb"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management("PropertyAnno", "OwnerAnno") works.&amp;nbsp; An annotation is selected and using the Select Features tool, the script runs, and copies and pastes the annotation from PropertyAnno into OwnerAnno.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The issue is with:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;They are defined as Layers, but the output requires a Feature Class.&amp;nbsp; Commenting those out, the script works outside of an edit session.&amp;nbsp; But, when the script is run multiple times, the previous copy does not save.&amp;nbsp; How can the copy be saved?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark, I am currently testing your suggestion.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 15:31:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666778#M51773</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-10T15:31:26Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666779#M51774</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am trying to do a similar task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Make a selection_by_attributes on a .gdb Annotation layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Copy &amp;amp; Paste this selection into an &lt;/SPAN&gt;&lt;SPAN style="font-style:italic;"&gt;Existing&lt;/SPAN&gt;&lt;SPAN&gt; .gdb Annotation layer.&amp;nbsp; Further, I'd like to copy the selected annotation into a specific annotation class within the specified target layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am able to do this in an editing session.&amp;nbsp; Is this possible using python?&amp;nbsp; Can you use cursors to copy and paste features from one FC to another?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 20:13:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666779#M51774</guid>
      <dc:creator>AdamCrateau1</dc:creator>
      <dc:date>2013-09-10T20:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666780#M51775</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Richard,&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;I have tested each of the suggestions multiple times and my results were unsuccessful.&lt;BR /&gt;arcpy.CopyFeatures_management(pa, oa) approach returns the Error 840: The value is not a Feature Class.&lt;BR /&gt;arcpy.CopyFeatures_management(pa.name, oa.name approach runs but does not work.&lt;BR /&gt;&lt;BR /&gt;But, arcpy.env.workspace = "C:\Working\MyData\Python.gdb"&lt;BR /&gt;arcpy.CopyFeatures_management("PropertyAnno", "OwnerAnno") works.&amp;nbsp; An annotation is selected and using the Select Features tool, the script runs, and copies and pastes the annotation from PropertyAnno into OwnerAnno.&lt;BR /&gt;&lt;BR /&gt;The issue is with:&lt;BR /&gt;&lt;BR /&gt;pa = arcpy.mapping.ListLayers(mxd, "PropertyAnno", df)[0]&lt;BR /&gt;oa = arcpy.mapping.ListLayers(mxd, "OwnerAnno", df)[0]&lt;BR /&gt;&lt;BR /&gt;They are defined as Layers, but the output requires a Feature Class.&amp;nbsp; Commenting those out, the script works outside of an edit session.&amp;nbsp; But, when the script is run multiple times, the previous copy does not save.&amp;nbsp; How can the copy be saved?&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Mark, I am currently testing your suggestion.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.CopyFeatures_management(pa, oa.dataSource)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;pa should be the layer, because it has a selection, but dataSource should get the feature class and path for the output.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Sep 2013 23:18:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666780#M51775</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-09-10T23:18:46Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666781#M51776</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Try:&lt;BR /&gt;&lt;BR /&gt;arcpy.CopyFeatures_management(pa, oa.dataSource)&lt;BR /&gt;&lt;BR /&gt;pa should be the layer, because it has a selection, but dataSource should get the feature class and path for the output.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Richard,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The result is the same.&amp;nbsp; The script works, the selected annotation is copied from pa to oa.&amp;nbsp; But, when the script is run the second time, the first copy is nullified, and the annotation(s) revert back from oa to pa.&amp;nbsp; It works like editing and not saving edits.&amp;nbsp; The tricky part seems to be copying &amp;amp; pasting into an existing Feature Class and having the Annotations saved into the Feature Class.&amp;nbsp; I have also tried the Copy_management(input, output), but the statement does not like the existing oa Feature Class.&amp;nbsp; Any further suggestions on how to get the copy &amp;amp; paste to "save"?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Mark,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Your suggestion of copying &amp;amp; pasting to a new Feature Class works.&amp;nbsp; But, I want to use the two existing Annotation Feature Classes within ArcMap.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 11:08:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666781#M51776</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-11T11:08:31Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666782#M51777</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Richard,&lt;BR /&gt;&lt;BR /&gt;The result is the same.&amp;nbsp; The script works, the selected annotation is copied from pa to oa.&amp;nbsp; But, when the script is run the second time, the first copy is nullified, and the annotation(s) revert back from oa to pa.&amp;nbsp; It works like editing and not saving edits.&amp;nbsp; The tricky part seems to be copying &amp;amp; pasting into an existing Feature Class and having the Annotations saved into the Feature Class.&amp;nbsp; I have also tried the Copy_management(input, output), but the statement does not like the existing oa Feature Class.&amp;nbsp; Any further suggestions on how to get the copy &amp;amp; paste to "save"?&lt;BR /&gt;&lt;BR /&gt;Mark,&lt;BR /&gt;&lt;BR /&gt;Your suggestion of copying &amp;amp; pasting to a new Feature Class works.&amp;nbsp; But, I want to use the two existing Annotation Feature Classes within ArcMap.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;It sounds to me like you are expecting Copy Features to do something it won't do.&amp;nbsp; It won't append features to an existing feature class, it creates a new feature class.&amp;nbsp; To append to an existing feature class and keep any previously existing features you have to use Append.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you actually do want to overwrite an existing feature class with a new feature class that uses the same name you cannot use the environment overwrite setting in a Python script to do that.&amp;nbsp; That setting does not work in a Python script, it only works in Model Builder.&amp;nbsp; You have to explicitly use the Delete tool to delete an existing feature class and then you can write to the same name the second time.&amp;nbsp; This is how it always works.&amp;nbsp; I have to run a script once without the Delete tool to just generate the outputs during the first run.&amp;nbsp; Then before I can run it any more times I first have to add the Delete tool to the code and then I can run it again.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 18:37:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666782#M51777</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-09-11T18:37:46Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666783#M51778</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It sounds to me like you are expecting Copy Features to do something it won't do.&amp;nbsp; It won't append features to an existing feature class, it creates a new feature class.&amp;nbsp; To append to an existing feature class and keep any previously existing features you have to use Append.&lt;BR /&gt;&lt;BR /&gt;If you actually do want to overwrite an existing feature class with a new feature class that uses the same name you cannot use the environment overwrite setting in a Python script to do that.&amp;nbsp; That setting does not work in a Python script, it only works in Model Builder.&amp;nbsp; You have to explicitly use the Delete tool to delete an existing feature class and then you can write to the same name the second time.&amp;nbsp; This is how it always works.&amp;nbsp; I have to run a script once without the Delete tool to just generate the outputs during the first run.&amp;nbsp; Then before I can run it any more times I first have to add the Delete tool to the code and then I can run it again.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Based on your second paragraph, I was able to modify the script.&amp;nbsp; The script now runs as intended.&amp;nbsp; It copies from pa, pastes into oa, and deletes the original annotation from pa.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Sep 2013 19:04:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666783#M51778</guid>
      <dc:creator>MikeYoung5</dc:creator>
      <dc:date>2013-09-11T19:04:43Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666784#M51779</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;All,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am writing a similiar script.&amp;nbsp; I need the output to have parentheses added around an integer. For example, instead of 31, I need the output to be (31).&amp;nbsp; Where can I locate information on how to add parentheses?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 18:37:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666784#M51779</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-09-12T18:37:07Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666785#M51780</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;All,&lt;BR /&gt;&lt;BR /&gt;I am writing a similiar script.&amp;nbsp; I need the output to have parentheses added around an integer. For example, instead of 31, I need the output to be (31).&amp;nbsp; Where can I locate information on how to add parentheses?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In python to make an integer variable into a string with parentheses added around it you would do something like:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;parenInt = "(" + str(myInt) + ")"&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;where myInt is an integer value variable and parenInt is a string of the interger surrounded by parantheses.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 12 Sep 2013 19:21:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666785#M51780</guid>
      <dc:creator>RichardFairhurst</dc:creator>
      <dc:date>2013-09-12T19:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: cut &amp; paste annotations</title>
      <link>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666786#M51781</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In python to make an integer variable into a string with parentheses added around it you would do something like:&lt;BR /&gt;&lt;BR /&gt;parenInt = "(" + str(myInt) + ")"&lt;BR /&gt;&lt;BR /&gt;where myInt is an integer value variable and parenInt is a string of the interger surrounded by parantheses.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The string is not working.&amp;nbsp; I suspect that is because I asked the wrong question.&amp;nbsp; I have an Annotation Feature Class that is displaying the information as integers within ArcMap, but the field type is a string.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 13 Sep 2013 11:47:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cut-amp-amp-paste-annotations/m-p/666786#M51781</guid>
      <dc:creator>JacobDrvar</dc:creator>
      <dc:date>2013-09-13T11:47:45Z</dc:date>
    </item>
  </channel>
</rss>

