<?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 Text Element is unremovable on layout when adding from SDK. in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/text-element-is-unremovable-on-layout-when-adding/m-p/1052939#M6534</link>
    <description>&lt;P&gt;I am adding a text element via sdk on the LayoutAdded event.&amp;nbsp; If I move that text element on my layout it shows twice when I export the layout. It shows both where I originally set the element programmatically and it shows in the location I moved it to. I can't get rid of the original element graphic no matter what I do. If I remove the text element it still shows when I export the layout. This is the code I use below, the "LayoutAddedEvent.Subscribe" is located in the initialize function of an add-in.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;LayoutAddedEvent.Subscribe(OnLayoutAdded, true);


private async void OnLayoutAdded(LayoutAddedEventArgs obj)
        {
           
            var lyt = obj.Layout;
            String Disclaimer2 = "This is a disclaimer.";

            await QueuedTask.Run(() =&amp;gt;
            {
                Coordinate2D titleTxt_ll = new Coordinate2D(0, 0);
                CIMTextSymbol arial36bold = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 8, "Arial", "Bold");
                GraphicElement titleTxtElm = LayoutElementFactory.Instance.CreatePointTextGraphicElement(obj.Layout, titleTxt_ll, Disclaimer2, arial36bold);
                titleTxtElm.SetName("Disclaimer");
                //titleTxtElm.SetLocked(true);
                
            });
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; This is where the element originally is&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_0-1619729788745.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12192i13E5D5C71918EDA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_0-1619729788745.png" alt="JamalWest2_0-1619729788745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the next image I have added a mapframe and moved the text element.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_2-1619729969350.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12194i892A779AC065E998/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_2-1619729969350.png" alt="JamalWest2_2-1619729969350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what happens when I then export the layout.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_3-1619730085863.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12195i9FFD7653BCDD439C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_3-1619730085863.png" alt="JamalWest2_3-1619730085863.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next I completely removed the text element from the layout using the TOC and this is what happened.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_4-1619730216675.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12197i8394821F894BB64F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_4-1619730216675.png" alt="JamalWest2_4-1619730216675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this is a bug. Any insights or solutions&amp;nbsp; on this would be appreciated, thanks.&lt;/P&gt;</description>
    <pubDate>Thu, 29 Apr 2021 21:06:06 GMT</pubDate>
    <dc:creator>JamalWest2</dc:creator>
    <dc:date>2021-04-29T21:06:06Z</dc:date>
    <item>
      <title>Text Element is unremovable on layout when adding from SDK.</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/text-element-is-unremovable-on-layout-when-adding/m-p/1052939#M6534</link>
      <description>&lt;P&gt;I am adding a text element via sdk on the LayoutAdded event.&amp;nbsp; If I move that text element on my layout it shows twice when I export the layout. It shows both where I originally set the element programmatically and it shows in the location I moved it to. I can't get rid of the original element graphic no matter what I do. If I remove the text element it still shows when I export the layout. This is the code I use below, the "LayoutAddedEvent.Subscribe" is located in the initialize function of an add-in.&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;LayoutAddedEvent.Subscribe(OnLayoutAdded, true);


private async void OnLayoutAdded(LayoutAddedEventArgs obj)
        {
           
            var lyt = obj.Layout;
            String Disclaimer2 = "This is a disclaimer.";

            await QueuedTask.Run(() =&amp;gt;
            {
                Coordinate2D titleTxt_ll = new Coordinate2D(0, 0);
                CIMTextSymbol arial36bold = SymbolFactory.Instance.ConstructTextSymbol(ColorFactory.Instance.BlackRGB, 8, "Arial", "Bold");
                GraphicElement titleTxtElm = LayoutElementFactory.Instance.CreatePointTextGraphicElement(obj.Layout, titleTxt_ll, Disclaimer2, arial36bold);
                titleTxtElm.SetName("Disclaimer");
                //titleTxtElm.SetLocked(true);
                
            });
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp; This is where the element originally is&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_0-1619729788745.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12192i13E5D5C71918EDA1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_0-1619729788745.png" alt="JamalWest2_0-1619729788745.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;In the next image I have added a mapframe and moved the text element.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_2-1619729969350.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12194i892A779AC065E998/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_2-1619729969350.png" alt="JamalWest2_2-1619729969350.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is what happens when I then export the layout.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_3-1619730085863.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12195i9FFD7653BCDD439C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_3-1619730085863.png" alt="JamalWest2_3-1619730085863.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Next I completely removed the text element from the layout using the TOC and this is what happened.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="JamalWest2_4-1619730216675.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/12197i8394821F894BB64F/image-size/medium?v=v2&amp;amp;px=400" role="button" title="JamalWest2_4-1619730216675.png" alt="JamalWest2_4-1619730216675.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I believe this is a bug. Any insights or solutions&amp;nbsp; on this would be appreciated, thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 29 Apr 2021 21:06:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/text-element-is-unremovable-on-layout-when-adding/m-p/1052939#M6534</guid>
      <dc:creator>JamalWest2</dc:creator>
      <dc:date>2021-04-29T21:06:06Z</dc:date>
    </item>
  </channel>
</rss>

