<?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: Save custom element problem ArcObject Add-in. in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561162#M15147</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="" data-fulltext="" data-placeholder="Çeviri" dir="ltr" style="color: #212121; background-color: #ffffff; border: none; font-size: 16px !important; padding: 0px 0.14em 0px 0px;"&gt;&lt;SPAN lang="en"&gt;Do you have any information on this problem? Could this error be an Add-in bug?&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 24 Apr 2018 11:19:24 GMT</pubDate>
    <dc:creator>tanerkoka</dc:creator>
    <dc:date>2018-04-24T11:19:24Z</dc:date>
    <item>
      <title>Save custom element problem ArcObject Add-in.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561161#M15146</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I develope command with ArcObject SDK Add-in for 10.5 ArcMap.I created my own polygon element&amp;nbsp; (MyElement) &lt;STRONG&gt;inherit&amp;nbsp;PolygonElementClass , IElement, IPersistStream&lt;/STRONG&gt; for Index Maping jobs in ArcMap for customers .But I have problem when I save and open document after adding my Element (MyElement)&amp;nbsp; in &lt;SPAN&gt;GraphicsContainer&lt;/SPAN&gt;.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here is below&amp;nbsp; my class and adding to IGraphicsContainer codes. With below code I can Add my own element on the &lt;SPAN&gt;GraphicsContainer&amp;nbsp;&amp;nbsp;&lt;/SPAN&gt;but but after save this document ArcMap crashes and gives exception like below.&lt;/P&gt;&lt;P&gt;When I Add simple ArcObject Polygon element (IElement element = new PolygonElementClass()) there is not any problem when opening and save document.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I sove this problem ? Can you help to me ?İs It Add-in support save objects using like&amp;nbsp;&lt;STRONG&gt;IPersistStream&lt;/STRONG&gt; ? Here is the codes and pictures below:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;Codes :&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;public class &lt;SPAN&gt;MyElement&amp;nbsp;&lt;/SPAN&gt;: PolygonElementClass , IElement, IPersistStream&lt;/P&gt;&lt;P&gt;{&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; public IEnvelope Env&lt;/P&gt;&lt;P&gt;&amp;nbsp; public string Name&amp;nbsp;&lt;/P&gt;&lt;P&gt;.....&lt;/P&gt;&lt;P&gt;.....properties,functions.etc.&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ICompositeGraphicsLayer cGLayer = &amp;nbsp;ArcMap.Document.FocusMap.BasicGraphicsLayer as ICompositeGraphicsLayer;&lt;BR /&gt; IGraphicsLayer gLayer = cGLayer.AddLayer("Scale_1:1000", null);&lt;/P&gt;&lt;P&gt;...seting scale graphicLayer (ex:&amp;nbsp;&lt;SPAN&gt;1:1000&lt;/SPAN&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IGraphicsContainer gCont = &lt;SPAN&gt;gLayer&amp;nbsp;&lt;/SPAN&gt;as IGraphicsContainer;&lt;/P&gt;&lt;P&gt;foreach (&lt;SPAN&gt;MyElement my&lt;/SPAN&gt;El in myElArray)&lt;BR /&gt; {&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;gCont&lt;/SPAN&gt;.AddElement(my&lt;SPAN&gt;El&lt;/SPAN&gt;,0);&lt;/P&gt;&lt;P&gt;}&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;Creating my Element:&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;IMG __jive_id="402370" alt="Creating own Element" class="image-1 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/402370_Element.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;STRONG&gt;Exception after save and open document in Arcmap:&lt;/STRONG&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="402407" alt="Exception" class="image-2 jive-image j-img-original" src="https://community.esri.com/legacyfs/online/402407_ElementException.png" style="height: auto;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;P&gt;Best Regards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 19 Apr 2018 07:14:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561161#M15146</guid>
      <dc:creator>tanerkoka</dc:creator>
      <dc:date>2018-04-19T07:14:25Z</dc:date>
    </item>
    <item>
      <title>Re: Save custom element problem ArcObject Add-in.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561162#M15147</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="" data-fulltext="" data-placeholder="Çeviri" dir="ltr" style="color: #212121; background-color: #ffffff; border: none; font-size: 16px !important; padding: 0px 0.14em 0px 0px;"&gt;&lt;SPAN lang="en"&gt;Do you have any information on this problem? Could this error be an Add-in bug?&lt;/SPAN&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Apr 2018 11:19:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561162#M15147</guid>
      <dc:creator>tanerkoka</dc:creator>
      <dc:date>2018-04-24T11:19:24Z</dc:date>
    </item>
    <item>
      <title>Re: Save custom element problem ArcObject Add-in.</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561163#M15148</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #212121; background-color: #ffffff; font-size: 16px;"&gt;Why can not you answer this question positively or negatively?&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 May 2018 14:09:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/save-custom-element-problem-arcobject-add-in/m-p/561163#M15148</guid>
      <dc:creator>tanerkoka</dc:creator>
      <dc:date>2018-05-04T14:09:31Z</dc:date>
    </item>
  </channel>
</rss>

