<?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: Annotate Selected Features in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626070#M16883</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good job!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Oct 2020 23:46:23 GMT</pubDate>
    <dc:creator>Alber_Verster</dc:creator>
    <dc:date>2020-10-26T23:46:23Z</dc:date>
    <item>
      <title>Annotate Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626067#M16880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Basically what I want to do is annotate selected pipe. The function is similar as ArcMap COTs function. (Select feature in ArcMap, right click layer name in TOC and select ???Annotate Selected Features???)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a pipe feature layer and pipe_Anno layer which is feature linked. AnnotateLayerProperties had been custom previously. If I run ArcMap COTs function, annotation can be popped up.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Firstly, I can get AnnotateLayerProperties and then related Symbol setting, I can create an new feature and put this feature in pipe_Anno layer with related symbol setting, everything is fine except feature location, because I want to put this feature at start/end point of this pipe and all of these setting has been done in Annotation layer properties by ArcCatalog. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Then I checked the ESRI help and tried below code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; IAnnotateFeature2 pAnnotateFeature = new AnnotateFeatureClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; IMapOverposter pMapOverposter = m_Map as IMapOverposter;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IGraphicsContainer pGraphicsContainer;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IBarrierCollection pBarrierCollection;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pBarrierCollection = m_Map.get_Barriers(m_MxdDocument.ActiveView.Extent) as IBarrierCollection;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;IElement pPlacedElement=null;&amp;nbsp; IElement pUnplacedElement=null;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pAnnotateFeature.Label(pMapOverposter.OverposterProperties, pAnnotateLayerProperties, pSelectedFeature, m_MxdDocument.ActiveView.ScreenDisplay as IDisplay, m_Map.SpatialReference, pBarrierCollection, out pPlacedElement, out pUnplacedElement);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The reason is I want to get Element based on custom setting, unfortunately I got error as "Attempted to read or write protected memory. This is often an indication that other memory is corrupt";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there something I am missing? Or is there a way can help me find the suitable annotation location based on setting? &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Bing&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 11 Jul 2013 04:56:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626067#M16880</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-11T04:56:37Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626068#M16881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Anyone did this before? much appreciate for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Jul 2013 22:42:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626068#M16881</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-17T22:42:41Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626069#M16882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;finally I found the reason.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Before I do annotation, i have to detect LabelEngine, previous code just works for ESRI default label engine, if the label engine is Maplex, I have to use MaplexAnnotateFeatureClass. thanks to everyone.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Jul 2013 01:52:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626069#M16882</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2013-07-18T01:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: Annotate Selected Features</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626070#M16883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;good job!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Oct 2020 23:46:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/annotate-selected-features/m-p/626070#M16883</guid>
      <dc:creator>Alber_Verster</dc:creator>
      <dc:date>2020-10-26T23:46:23Z</dc:date>
    </item>
  </channel>
</rss>

