<?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: ProjectClosing event in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736657#M32318</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pete,&lt;/P&gt;&lt;P&gt;In your config.daml file for the VS project, find the module entry and set autoLoad to true.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;modules&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;insertModule id&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"EventModule_Module"&lt;/SPAN&gt; className&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Module1"&lt;/SPAN&gt; autoLoad&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"true"&lt;/SPAN&gt; caption&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Module1"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 07:23:26 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-12T07:23:26Z</dc:date>
    <item>
      <title>ProjectClosing event</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736656#M32317</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi - I want to listen to the project closing event, but am wondering where to put the code.&amp;nbsp; Now I have the code in the initialize event of my addin module, but it only runs if the user clicks to open the addin.&amp;nbsp; Is there some global space where the code will always run, even if the user doesnt click my module?&amp;nbsp; The code is below, and works fine when the module is clicked:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;//module code&lt;/P&gt;&lt;P&gt;protected override bool Initialize()&lt;BR /&gt; {&lt;BR /&gt; &lt;BR /&gt; //Closing event&lt;BR /&gt; ArcGIS.Desktop.Core.Events.ProjectClosingEvent.Subscribe((args) =&amp;gt;&lt;BR /&gt; {&lt;BR /&gt; MessageBox.Show("ProjectClosingEvent");&lt;BR /&gt; return Task.FromResult(0);&lt;BR /&gt; });&lt;BR /&gt; return true;&lt;BR /&gt; }&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pete&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 19:18:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736656#M32317</guid>
      <dc:creator>PeteVitt</dc:creator>
      <dc:date>2018-01-24T19:18:10Z</dc:date>
    </item>
    <item>
      <title>Re: ProjectClosing event</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736657#M32318</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pete,&lt;/P&gt;&lt;P&gt;In your config.daml file for the VS project, find the module entry and set autoLoad to true.&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;modules&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;insertModule id&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"EventModule_Module"&lt;/SPAN&gt; className&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Module1"&lt;/SPAN&gt; autoLoad&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"true"&lt;/SPAN&gt; caption&lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"Module1"&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 07:23:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736657#M32318</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T07:23:26Z</dc:date>
    </item>
    <item>
      <title>Re: ProjectClosing event</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736658#M32319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Sean that did the trick!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 21:41:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/projectclosing-event/m-p/736658#M32319</guid>
      <dc:creator>PeteVitt</dc:creator>
      <dc:date>2018-01-24T21:41:10Z</dc:date>
    </item>
  </channel>
</rss>

