<?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: Implementing persistence of a symbol in an AddIn in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/implementing-persistence-of-a-symbol-in-an-addin/m-p/187794#M4879</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Took me quite a while to figure this out, but just in case this happens to someone else I post the reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This link: &lt;/SPAN&gt;&lt;A href="http://www.techques.com/question/26-29791/Alternatives-to-IPersistVariant-in-ArcMap-add-in%27s"&gt;http://www.techques.com/question/26-29791/Alternatives-to-IPersistVariant-in-ArcMap-add-in%27s&lt;/A&gt;&lt;SPAN&gt; has the answer. Use the PersistenceHelper class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 03 Aug 2013 03:38:45 GMT</pubDate>
    <dc:creator>MauricioPérez_Valverde</dc:creator>
    <dc:date>2013-08-03T03:38:45Z</dc:date>
    <item>
      <title>Implementing persistence of a symbol in an AddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/implementing-persistence-of-a-symbol-in-an-addin/m-p/187793#M4878</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey there,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like my map document to save a user chosen symbol. Therefore I want to implement persistence in my AddIn. There is an example in ArcObjects 10.1 Help, which is unfortunately missing an important piece: &lt;/SPAN&gt;&lt;SPAN style="color:&amp;quot;#FF0000&amp;quot;;"&gt;PersistHelper class&lt;/SPAN&gt;&lt;SPAN&gt;. Does anybody have an example of persisting custom types in AddIns?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks and best regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;S. Reuther&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.arcgis.com/en/help/arcobjects-net/conceptualHelp/#/Add_in_coding_patterns/0001000000zz000000/" rel="nofollow"&gt;http://resources.arcgis.com/en/help/arcobjects-net/conceptualHelp/#/Add_in_coding_patterns/0001000000zz000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Quote of help content:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[... To store custom types and object graphs, use the ArcObjects PersistHelper class. The following code example shows an extension writing a private struct, which manages an ArcObjects type:[C#]private MyPersistentData _data;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected override void OnLoad(Stream inStrm)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; // Initialize the struct.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; _data.Location = "";&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; _data.Point = new ESRI.ArcGIS.Geometry.PointClass();&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt; PersistHelper.Load &amp;lt; MyPersistentData &amp;gt; (inStrm, ref _data);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected override void OnSave(Stream outStrm)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; PersistHelper.Save &amp;lt; MyPersistentData &amp;gt; (outStrm, _data);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;[Serializable()]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;private struct MyPersistentData&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public string Location;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; public ESRI.ArcGIS.Geometry.PointClass Point;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;} ...]&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Apr 2013 10:25:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/implementing-persistence-of-a-symbol-in-an-addin/m-p/187793#M4878</guid>
      <dc:creator>SandyReuther</dc:creator>
      <dc:date>2013-04-23T10:25:46Z</dc:date>
    </item>
    <item>
      <title>Re: Implementing persistence of a symbol in an AddIn</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/implementing-persistence-of-a-symbol-in-an-addin/m-p/187794#M4879</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Took me quite a while to figure this out, but just in case this happens to someone else I post the reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This link: &lt;/SPAN&gt;&lt;A href="http://www.techques.com/question/26-29791/Alternatives-to-IPersistVariant-in-ArcMap-add-in%27s"&gt;http://www.techques.com/question/26-29791/Alternatives-to-IPersistVariant-in-ArcMap-add-in%27s&lt;/A&gt;&lt;SPAN&gt; has the answer. Use the PersistenceHelper class.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 03 Aug 2013 03:38:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/implementing-persistence-of-a-symbol-in-an-addin/m-p/187794#M4879</guid>
      <dc:creator>MauricioPérez_Valverde</dc:creator>
      <dc:date>2013-08-03T03:38:45Z</dc:date>
    </item>
  </channel>
</rss>

