<?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 How to create a new (non-feature-linked) annotation feature and set its annotation? in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-create-a-new-non-feature-linked-annotation/m-p/547162#M14801</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using ArcGIS-ArcView 10.0 and Python 2.6.5 in an external script.&amp;nbsp; All objects created in the script are in process, built using IObjectFactory.&amp;nbsp; I want to create a new annotation feature in an existing, non-feature-linked annotation feature class.&amp;nbsp; I am starting with IFeatureClass on a valid annotation feature class (pAnnoFC).&amp;nbsp; I am creating only one feature at a time, so I thought I could use IFeatureClass.CreateFeature instead of an InsertCursor and InsertFeature.&amp;nbsp; The following code,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pNewFeature = pAnnoFC.CreateFeature&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of returning IFeature, returns a bound method pointer with Python type:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;bound method POINTER(IFeatureClass).CreateFeature of &amp;lt;POINTER(IFeatureClass) ptr=0x3fb09a4 at 12d9a9e0&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In need to QI to IAnnotationFeature2 to set the Annotation and other properties, but I need a valid IFeature to do that.&amp;nbsp; I also want then to update the value of a long integer field that I added to the existing anno class.&amp;nbsp; How do I go about creating a valid new anno feature (IFeature)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all for the help.&amp;nbsp; --Ti&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jan 2011 18:57:29 GMT</pubDate>
    <dc:creator>TiCrossman</dc:creator>
    <dc:date>2011-01-19T18:57:29Z</dc:date>
    <item>
      <title>How to create a new (non-feature-linked) annotation feature and set its annotation?</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-create-a-new-non-feature-linked-annotation/m-p/547162#M14801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I am using ArcGIS-ArcView 10.0 and Python 2.6.5 in an external script.&amp;nbsp; All objects created in the script are in process, built using IObjectFactory.&amp;nbsp; I want to create a new annotation feature in an existing, non-feature-linked annotation feature class.&amp;nbsp; I am starting with IFeatureClass on a valid annotation feature class (pAnnoFC).&amp;nbsp; I am creating only one feature at a time, so I thought I could use IFeatureClass.CreateFeature instead of an InsertCursor and InsertFeature.&amp;nbsp; The following code,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; pNewFeature = pAnnoFC.CreateFeature&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;instead of returning IFeature, returns a bound method pointer with Python type:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;&amp;lt;bound method POINTER(IFeatureClass).CreateFeature of &amp;lt;POINTER(IFeatureClass) ptr=0x3fb09a4 at 12d9a9e0&amp;gt;&amp;gt;&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In need to QI to IAnnotationFeature2 to set the Annotation and other properties, but I need a valid IFeature to do that.&amp;nbsp; I also want then to update the value of a long integer field that I added to the existing anno class.&amp;nbsp; How do I go about creating a valid new anno feature (IFeature)?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you all for the help.&amp;nbsp; --Ti&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 18:57:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/how-to-create-a-new-non-feature-linked-annotation/m-p/547162#M14801</guid>
      <dc:creator>TiCrossman</dc:creator>
      <dc:date>2011-01-19T18:57:29Z</dc:date>
    </item>
  </channel>
</rss>

