<?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>idea arcpy.mp Map and Layout isOpen in ArcGIS Pro Ideas</title>
    <link>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idi-p/1667684</link>
    <description>&lt;P&gt;For arcpy.mp Maps&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.mp.ArcGISProject("CURRENT").listMaps()&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;and Layouts&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.mp.ArcGISProject("CURRENT").listLayouts()&lt;/LI-CODE&gt;&lt;P&gt;add an isOpen boolean property.&lt;/P&gt;&lt;P&gt;Use case:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;layout = arcpy.mp.ArcGISProject("CURRENT").listLayouts('My Layout')[0]
if not layout.isOpen:
    layout.openView()&lt;/LI-CODE&gt;&lt;P&gt;Without this, if the user runs the script multiple times, they get multiple views of the layout.&lt;/P&gt;&lt;P&gt;See also:&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/listing-open-maps-only-in-an-arcgis-pro-project/td-p/1118592" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/python-questions/listing-open-maps-only-in-an-arcgis-pro-project/td-p/1118592&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 21 Nov 2025 21:02:07 GMT</pubDate>
    <dc:creator>Jeff-Reinhart</dc:creator>
    <dc:date>2025-11-21T21:02:07Z</dc:date>
    <item>
      <title>arcpy.mp Map and Layout isOpen</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idi-p/1667684</link>
      <description>&lt;P&gt;For arcpy.mp Maps&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.mp.ArcGISProject("CURRENT").listMaps()&lt;/LI-CODE&gt;&lt;P&gt;&lt;SPAN&gt;and Layouts&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="python"&gt;arcpy.mp.ArcGISProject("CURRENT").listLayouts()&lt;/LI-CODE&gt;&lt;P&gt;add an isOpen boolean property.&lt;/P&gt;&lt;P&gt;Use case:&lt;/P&gt;&lt;LI-CODE lang="c"&gt;layout = arcpy.mp.ArcGISProject("CURRENT").listLayouts('My Layout')[0]
if not layout.isOpen:
    layout.openView()&lt;/LI-CODE&gt;&lt;P&gt;Without this, if the user runs the script multiple times, they get multiple views of the layout.&lt;/P&gt;&lt;P&gt;See also:&amp;nbsp;&lt;A href="https://community.esri.com/t5/python-questions/listing-open-maps-only-in-an-arcgis-pro-project/td-p/1118592" target="_blank" rel="noopener"&gt;https://community.esri.com/t5/python-questions/listing-open-maps-only-in-an-arcgis-pro-project/td-p/1118592&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 21:02:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idi-p/1667684</guid>
      <dc:creator>Jeff-Reinhart</dc:creator>
      <dc:date>2025-11-21T21:02:07Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp Map and Layout isOpen - Status changed to: Needs Clarification</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1667972#M36770</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/600523"&gt;@Jeff-Reinhart&lt;/a&gt;&amp;nbsp;thanks for your feedback!&amp;nbsp; I'd like to get additional feedback if possible.&lt;/P&gt;&lt;P&gt;First, anything that involves working with views via arcpy.mp, it is documented that these members only work for scripts that run within the application (in-process).&amp;nbsp; "Views" really don't exist when referencing a project by path (out-of-process).&amp;nbsp; Given that, we really try to limit the number of in-process only properties and methods.&amp;nbsp; Our main focus is automation and less application customization but we recognize the needs.&lt;/P&gt;&lt;P&gt;Second, currently we have ArcGISProject.closeViews() that takes an enum of project item types (i.e., maps, layouts, and reports).&amp;nbsp; So in your "My Layout" example you could have something like:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;p = arcpy.mp.ArcGISProject("CURRENT")
lyt = p.listLayouts('My Layout')[0]
p.closeViews('LAYOUT')  #This closes all layout views
lyt.openView() #This opens AND activates your view&lt;/LI-CODE&gt;&lt;P&gt;One of the limitations, in this example, is it closes all layout views, 'My Layout', 'Your Layout' 'Everybodys Layout' etc.&amp;nbsp; Probably more of an issue with Map items.&lt;/P&gt;&lt;P&gt;But what if we extended closeViews() to include a wildcard filter:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;p.closeViews('LAYOUT', wildcard='My Layout') #This would close any views specific to My Layout&lt;/LI-CODE&gt;&lt;P&gt;The above would close all instances of My Layout but then your would call openView to open AND activate it.&lt;/P&gt;&lt;P&gt;A possible problem with isOpen is the layout may be open but it might NOT be active.&amp;nbsp; That would require we add additional in-process only methods like .makeActive, which again, we would like to avoid.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 19:43:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1667972#M36770</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2025-11-21T19:43:52Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp Map and Layout isOpen</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1668005#M36772</link>
      <description>&lt;P&gt;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/1134"&gt;@JeffBarrette&lt;/a&gt;&amp;nbsp;thanks for the response.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;p.closeViews('LAYOUT', wildcard='My Layout')&lt;/PRE&gt;&lt;P&gt;would be a suitable solution for my use case.&lt;/P&gt;</description>
      <pubDate>Fri, 21 Nov 2025 21:51:40 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1668005#M36772</guid>
      <dc:creator>Jeff-Reinhart</dc:creator>
      <dc:date>2025-11-21T21:51:40Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy.mp Map and Layout isOpen - Status changed to: In Product Plan</title>
      <link>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1689052#M37745</link>
      <description>&lt;P&gt;This will be available in the upcoming 3.7 release.&lt;/P&gt;</description>
      <pubDate>Fri, 06 Mar 2026 19:24:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-ideas/arcpy-mp-map-and-layout-isopen/idc-p/1689052#M37745</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2026-03-06T19:24:35Z</dc:date>
    </item>
  </channel>
</rss>

