<?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 Loading an extension-related mxd by double clicking it in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/loading-an-extension-related-mxd-by-double/m-p/649973#M17433</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am currently working in a company offering GIS solutions, and using ArcGIS tools on a daily basis. One of their main products is an ArcMap extension, which I am assigned on to correct some remaining bugs (my configuration being Windows 8 , ArcGIS 10.1 and Visual Studio 2008). One of the olders still opened (more than 2 years) is, as described by the title, the impossibility of opening a custom mxd file by double clicking it. Is was reported as not fatal, the file being loaded without the custom solvers, displaying a "naked" network, and the probleme was supposedly impossible to debug from Visual Studio.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spent the best of three days looking for informations about it, and all I could find were the following threads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/6357-Doubleclick-mxd-startup-and-debugging"&gt;http://forums.arcgis.com/threads/6357-Doubleclick-mxd-startup-and-debugging&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=197650"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=197650&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first was a really good kickstart to understand what happened since I wasn't aware of this way of debugging with VS, but it's a shame that the user didn't give any feedback on his progress. The second obviously wasn't helping at all. With lots of debugging and experimenting, I finally "solved" the problem using the ApplicationInitialized event, and loading the file from here with IApplication.OpenDocument if the application was launched from a double click. The idea was to let the file be loaded with the default method, and then loading it he right way by triggering our own implementation of IPersistStream.Load.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked fine at first, but someone found a file that fails to load in ArcMap by double clicking it, displaying the following message: [ATTACH=CONFIG]24572[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The file can be loaded from ArcMap with File&amp;gt;Open or the initial browsing panel, is recent and not corrupted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the problem is happening right after our implementation of IExtension.Startup, I tried anything I could in this method but I finally understood it isn't supposed to contain file manipulations. Then I tried to force ArcMap to always open a new file on start, but it didn't work either. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now that I have (I hope) clearly explained the context and the problem, my question is: is it possible to load a custom extension generated mxd with our own loading method right from the start, preventing ArcMap to load it any other way ? or to force it to launch from a double clicked file as it launches from the .exe ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on this problem very hard for a week now and I can't find anything else to try, so I really hope someone here will be able to help me. I find it very strange that there is no information available on how to implement this, since it is a feature that the client expects to have and a quite useful one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 22 May 2013 11:14:15 GMT</pubDate>
    <dc:creator>ArnaudFradin</dc:creator>
    <dc:date>2013-05-22T11:14:15Z</dc:date>
    <item>
      <title>Loading an extension-related mxd by double clicking it</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/loading-an-extension-related-mxd-by-double/m-p/649973#M17433</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi, I am currently working in a company offering GIS solutions, and using ArcGIS tools on a daily basis. One of their main products is an ArcMap extension, which I am assigned on to correct some remaining bugs (my configuration being Windows 8 , ArcGIS 10.1 and Visual Studio 2008). One of the olders still opened (more than 2 years) is, as described by the title, the impossibility of opening a custom mxd file by double clicking it. Is was reported as not fatal, the file being loaded without the custom solvers, displaying a "naked" network, and the probleme was supposedly impossible to debug from Visual Studio.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I spent the best of three days looking for informations about it, and all I could find were the following threads:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://forums.arcgis.com/threads/6357-Doubleclick-mxd-startup-and-debugging"&gt;http://forums.arcgis.com/threads/6357-Doubleclick-mxd-startup-and-debugging&lt;/A&gt;&lt;BR /&gt;&lt;A href="http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=197650"&gt;http://forums.esri.com/Thread.asp?c=93&amp;amp;f=993&amp;amp;t=197650&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The first was a really good kickstart to understand what happened since I wasn't aware of this way of debugging with VS, but it's a shame that the user didn't give any feedback on his progress. The second obviously wasn't helping at all. With lots of debugging and experimenting, I finally "solved" the problem using the ApplicationInitialized event, and loading the file from here with IApplication.OpenDocument if the application was launched from a double click. The idea was to let the file be loaded with the default method, and then loading it he right way by triggering our own implementation of IPersistStream.Load.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It worked fine at first, but someone found a file that fails to load in ArcMap by double clicking it, displaying the following message: [ATTACH=CONFIG]24572[/ATTACH]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The file can be loaded from ArcMap with File&amp;gt;Open or the initial browsing panel, is recent and not corrupted.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Since the problem is happening right after our implementation of IExtension.Startup, I tried anything I could in this method but I finally understood it isn't supposed to contain file manipulations. Then I tried to force ArcMap to always open a new file on start, but it didn't work either. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So now that I have (I hope) clearly explained the context and the problem, my question is: is it possible to load a custom extension generated mxd with our own loading method right from the start, preventing ArcMap to load it any other way ? or to force it to launch from a double clicked file as it launches from the .exe ?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am working on this problem very hard for a week now and I can't find anything else to try, so I really hope someone here will be able to help me. I find it very strange that there is no information available on how to implement this, since it is a feature that the client expects to have and a quite useful one.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 May 2013 11:14:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/loading-an-extension-related-mxd-by-double/m-p/649973#M17433</guid>
      <dc:creator>ArnaudFradin</dc:creator>
      <dc:date>2013-05-22T11:14:15Z</dc:date>
    </item>
  </channel>
</rss>

