<?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: Using MVVM's to open project with existing Map Pane View? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276064#M9612</link>
    <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2978"&gt;@RichardDaniels&lt;/a&gt;&amp;nbsp;thank you for your suggestion about using the map document collection though.&lt;/P&gt;</description>
    <pubDate>Thu, 06 Apr 2023 03:59:35 GMT</pubDate>
    <dc:creator>KT81</dc:creator>
    <dc:date>2023-04-06T03:59:35Z</dc:date>
    <item>
      <title>Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1275786#M9608</link>
      <description>&lt;P&gt;I'm using Visual Studio with ArcGIS Pro SDK my current version of ArcGIS Pro is&amp;nbsp; 3.1.0, A co-worker has created a python scripted that took 77 mxd's and converted them to aprx files, each one has an existing map in the Catalog pane associated with the map, but when you open the aprx there is no map pane view opened.&amp;nbsp; I was looking in the configuration of the ArcGIS Pro SDK and it seems like there should be a method to have the MVVM look to see if there is a map associated with the project and open that map in a map pane view.&amp;nbsp; I have narrowed down the location to be the ViewModel for the sdk configuration is where I should add an ICommand Interface or maybe another piece of code that adds this function to the "browse to project" functionality of the configuration,&amp;nbsp; but I haven't been able to find the documentation on how that command is called into the model view.&amp;nbsp; I was hoping someone could give me a little direction on if I am indeed correct or if there is another function / method I should be considering.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so this article goes into what I am trying to do but the I am not trying to use an OnClick method but use the View Model in the configuration to always check the project for a Map and open it up on startup of the project.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/t5/arcgis-pro-sdk-questions/open-an-existing-map/td-p/791296" target="_blank"&gt;https://community.esri.com/t5/arcgis-pro-sdk-questions/open-an-existing-map/td-p/791296&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Apr 2023 20:22:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1275786#M9608</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-05T20:22:36Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1275999#M9610</link>
      <description>Since you converted the MXDs to aprx why are you surprised that the default map is not 'open'? Go to the Catalog View pane, map folder, and open the map from there.&lt;BR /&gt;To do it programmatically you would need to grab the map document collection then, since you know there is only one map, you could do something like map[[0].open(). Otherwise you would need to search the collection by Name.&lt;BR /&gt;</description>
      <pubDate>Wed, 05 Apr 2023 21:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1275999#M9610</guid>
      <dc:creator>RichardDaniels</dc:creator>
      <dc:date>2023-04-05T21:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276063#M9611</link>
      <description>&lt;P&gt;Well the main reason I need to do this programmatically is because their are 77 of these mxd's that were converted to aprx's and this way I or someone else wouldn't need to open 77 aprxs' all over again.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 03:56:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276063#M9611</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-06T03:56:43Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276064#M9612</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/2978"&gt;@RichardDaniels&lt;/a&gt;&amp;nbsp;thank you for your suggestion about using the map document collection though.&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 03:59:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276064#M9612</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-06T03:59:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276161#M9613</link>
      <description>&lt;P&gt;Also do you have any examples of this in use or documentation links?&lt;/P&gt;</description>
      <pubDate>Thu, 06 Apr 2023 14:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276161#M9613</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-06T14:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276591#M9618</link>
      <description>&lt;P&gt;I attached a sample add-in project that opens all .aprx projects under a given folder (including all .aprx file in subfolders) and checks if the aprx has an open Map Pane, if it doesn't have an open Map Pane, the add-in takes the first Map and creates a map pane, then saves the project file.&lt;/P&gt;&lt;P&gt;Note that you might get prompted for input at some time and execution is slow at times because the add-in is using time outs for some operations.&lt;/P&gt;&lt;P&gt;To use the app, set a start folder and click the start button.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1680883289771.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/67495iDE10D344687B21D4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1680883289771.png" alt="Wolf_0-1680883289771.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 07 Apr 2023 16:03:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1276591#M9618</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-04-07T16:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1279452#M9690</link>
      <description>&lt;P&gt;Thanks a lot Wolf and my apologies for taking so long to test this addin, it works very nicely.&amp;nbsp; &amp;nbsp;I will study this and see if I can follow your workflow process through creating this because I really want to learn how to be a better .net programmer.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Apr 2023 21:46:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1279452#M9690</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-17T21:46:56Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283498#M9742</link>
      <description>&lt;P&gt;After testing the tool for a little while I noticed that it will open the first aprx file and open the map pane view but the next one it says it already has a map pane view open even though it doen't have one open, Also once I stop debugging and restart debugging to run the addin again in Pro it will go to the next aprx and open the Map Pane, but I have to run it multiple times.&amp;nbsp; I have been looking in the "Helpers for Project processing" region my, for some reason it sees the rest of the aprx files as having an opened map pane view even though they don't.&amp;nbsp; is it possible that when it checks the first aprx that it is still holding on to that map pane as open in the next Aprx file?&amp;nbsp; I&amp;nbsp; noticed it is checking for a list of map panes using IEnumerable&amp;lt;IMapPane&amp;gt; Method, I figured I could add an ifelse statement or would changing the syntax where it checks for open mapViews be better?&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 17:52:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283498#M9742</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-27T17:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283531#M9744</link>
      <description>&lt;P&gt;Can you send the log output showing the events ?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 18:48:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283531#M9744</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-04-27T18:48:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283561#M9746</link>
      <description>&lt;P&gt;I have attached the output file from the debug session, I was also able to direct the tool to a specific aprx file just to test it because I was curious if it was the .FirstOrDefault(); method that could be confusing the tool as shown in the snippet image.&amp;nbsp; I added the below to the code and it worked as I thought it would where it ignored the other 2 aprx files but saw the one called out.&lt;/P&gt;&lt;LI-CODE lang="c"&gt;.FirstOrDefault(item =&amp;gt; item.Name.Equals("Alfalfa_SD_2020"));&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="KelbyThomasson_0-1682624925454.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/69371i8DE34E9CF8D2C4AF/image-size/medium?v=v2&amp;amp;px=400" role="button" title="KelbyThomasson_0-1682624925454.png" alt="KelbyThomasson_0-1682624925454.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 27 Apr 2023 19:52:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1283561#M9746</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-04-27T19:52:22Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1284019#M9751</link>
      <description>&lt;P&gt;Hi Kelby,&lt;/P&gt;&lt;P&gt;&amp;nbsp;I think i found the problem in the&amp;nbsp;TimerTick state machine code.&amp;nbsp; The variable&amp;nbsp;_mapViewLoaded was not properly cleared before subscribing to the 'ActiveMapViewChanged' event.&amp;nbsp; &amp;nbsp;I attached the fixed code.&amp;nbsp; This code is also using the ArcGIS Pro event logger.&amp;nbsp; To start the Pro diagnostic monitor you can use the Ctrl+Alt+M key sequence to start it, or the&amp;nbsp;/enablediagnostics command line switch (see&amp;nbsp;&lt;A href="https://github.com/Esri/arcgis-pro-sdk/wiki/ProGuide-Command-line-switches-for-ArcGISPro.exe#enable-dynamic-mode-event-logging" target="_blank"&gt;ProGuide Command line switches for ArcGISPro.exe · Esri/arcgis-pro-sdk Wiki (github.com)&lt;/A&gt;&amp;nbsp;)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Wolf_0-1682705096964.png" style="width: 400px;"&gt;&lt;img src="https://community.esri.com/t5/image/serverpage/image-id/69500i14F30D244161C226/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Wolf_0-1682705096964.png" alt="Wolf_0-1682705096964.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Make sure to filter by 'ProcessProjectFiles' when viewing the log.&lt;/P&gt;&lt;P&gt;Anyways this attached add-in's version's start machine should work as required.&lt;/P&gt;</description>
      <pubDate>Fri, 28 Apr 2023 18:06:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1284019#M9751</guid>
      <dc:creator>Wolf</dc:creator>
      <dc:date>2023-04-28T18:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using MVVM's to open project with existing Map Pane View?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1286389#M9784</link>
      <description>&lt;P&gt;Thanks Wolf adding that event worked and cleared the subscription to event for the map being loaded.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 05 May 2023 20:48:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/using-mvvm-s-to-open-project-with-existing-map/m-p/1286389#M9784</guid>
      <dc:creator>KT81</dc:creator>
      <dc:date>2023-05-05T20:48:23Z</dc:date>
    </item>
  </channel>
</rss>

