<?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: Project Settings for Multiple Addins in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772449#M679</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the modules in both addins both called Module1? Do you have these in seperate Visual Studio projects? and does each project have a ProjectSettingsViewModel? I have the AutoLoad=true for both but only triggering the one OnReadSettingsAsync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Evan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Jul 2019 15:02:29 GMT</pubDate>
    <dc:creator>EvanMosher</dc:creator>
    <dc:date>2019-07-16T15:02:29Z</dc:date>
    <item>
      <title>Project Settings for Multiple Addins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772446#M676</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have 2 addins that i would like to&amp;nbsp;have settings items for. I have one working with Project Settings all set up, but when i try to add settings to my other addin,&amp;nbsp;it seems&amp;nbsp;that the override function to load project settings, OnReadSettingsAsync, only gets triggered in the one addin. Is there a way to share these settings across multiple addins?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 12:45:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772446#M676</guid>
      <dc:creator>EvanMosher</dc:creator>
      <dc:date>2019-07-16T12:45:39Z</dc:date>
    </item>
    <item>
      <title>Re: Project Settings for Multiple Addins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772447#M677</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Evan,&lt;/P&gt;&lt;P&gt;I store settings in library dll as singleton class with properties, but use them from more than 10 add-ins. Library dll added to GAC.&amp;nbsp;Project settings form&amp;nbsp;is stored in one of add-ins. That add-in manages loading and saving project properties from&amp;nbsp;Project to singleton class and back.&amp;nbsp;&amp;nbsp;There is no cross-references between add-ins.&lt;/P&gt;&lt;P&gt;There is only one thing you need to&amp;nbsp;do that&amp;nbsp;project settings add-in will be loaded first. More info here:&lt;/P&gt;&lt;P&gt;&lt;A href="https://www.esri.com/arcgis-blog/products/arcgis-pro/uncategorized/manage-arcgis-pro-add-in-loading/"&gt;https://www.esri.com/arcgis-blog/products/arcgis-pro/uncategorized/manage-arcgis-pro-add-in-loading/&lt;/A&gt;&lt;/P&gt;&lt;P&gt;In addition I use (&lt;CODE&gt;&amp;lt;modules&amp;gt;&amp;lt;insertModule .... autoLoad="true"&amp;gt;...&lt;/CODE&gt;).&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 13:33:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772447#M677</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2019-07-16T13:33:08Z</dc:date>
    </item>
    <item>
      <title>Re: Project Settings for Multiple Addins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772448#M678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Evan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm going to need to do this before the end of the summer too so took a quick break and decided to create two boilerplate C# ArcGIS Pro SDK AddIn's.&amp;nbsp; In both instances, I overrode both the OnWriteSettingsAsync and the OnReadSettingsAsync as shown below.&amp;nbsp; The only other thing I did (took make sure the modules would load since I didn't write any other code) was I edited each config.daml to turn on the autoload="true" for the &amp;lt;insertModule&amp;gt; tag.&amp;nbsp; To get ArcGIS Pro to fire the OnWriteSettingsAsync, I just adjusted the zoom level of the map and responded "Yes" to whether I wanted to save settings and both AddIn's OnWriteSettingsAsync fired and save the "Name" string that I specified.&amp;nbsp; When I reloaded the same project file, both OnReadSettingsAsync were called one after the other. I confirmed this via break-point in each method.&amp;nbsp; I'm using ArcGIS Pro 2.4 and the corresponding SDK and Visual Studio 2019.&amp;nbsp; Hope that helps.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;        &lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; Task &lt;SPAN class="token function"&gt;OnWriteSettingsAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ModuleSettingsWriter settings&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            System&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Diagnostics&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Debug&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;WriteLine&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"OnWriteSettings TestWriteSettingsNumber2....."&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            settings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Add&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"TestWriteSettingsNumber2"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;base&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;OnWriteSettingsAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;settings&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
        &lt;SPAN class="keyword token"&gt;protected&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;override&lt;/SPAN&gt; Task &lt;SPAN class="token function"&gt;OnReadSettingsAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;ModuleSettingsReader settings&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt; l_progress &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; settings&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;Get&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Name"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;as&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;string&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
            &lt;SPAN class="keyword token"&gt;return&lt;/SPAN&gt; &lt;SPAN class="keyword token"&gt;base&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;&lt;SPAN class="token function"&gt;OnReadSettingsAsync&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;settings&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;;&lt;/SPAN&gt;
        &lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 08:38:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772448#M678</guid>
      <dc:creator>DanH1</dc:creator>
      <dc:date>2021-12-12T08:38:31Z</dc:date>
    </item>
    <item>
      <title>Re: Project Settings for Multiple Addins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772449#M679</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Dan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the reply,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are the modules in both addins both called Module1? Do you have these in seperate Visual Studio projects? and does each project have a ProjectSettingsViewModel? I have the AutoLoad=true for both but only triggering the one OnReadSettingsAsync.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Evan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:02:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772449#M679</guid>
      <dc:creator>EvanMosher</dc:creator>
      <dc:date>2019-07-16T15:02:29Z</dc:date>
    </item>
    <item>
      <title>Re: Project Settings for Multiple Addins</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772450#M680</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;1. They are boilerplate projects so both projects have Module1 (not renamed)&lt;/P&gt;&lt;P&gt;2. They in separate Visual Studio Projects but the same solution.&lt;/P&gt;&lt;P&gt;3.&amp;nbsp;I did not use&amp;nbsp;the ProjectSettingsViewModel.&amp;nbsp; Just to save settings to your project you don't need that IMHO (unless you really need the user to see a property page).&amp;nbsp; As you can see all I did was override the the OnRead... and OnWrite...methods.&amp;nbsp; In one of our AddIns we have quite a few state variables and user settings are that are persisted this way, again, without using ProjectSettingsViewModel.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Jul 2019 15:39:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/project-settings-for-multiple-addins/m-p/772450#M680</guid>
      <dc:creator>DanH1</dc:creator>
      <dc:date>2019-07-16T15:39:11Z</dc:date>
    </item>
  </channel>
</rss>

