<?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: aprx.activeView (MapView or Layout) in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618034#M48222</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;view = aprx.activeView&lt;/P&gt;&lt;P&gt;name = view.map.name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2020 22:15:52 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2020-11-10T22:15:52Z</dc:date>
    <item>
      <title>aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618028#M48216</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm stumped. The following documentation says activeView will return the active MapView or Layout. I've searched high and low trying to find code to use which will tell me If the "active view" is a map or a layout but am having zero luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any insight appreciated.&lt;/P&gt;&lt;P&gt;Thanks!&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapview-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapview-class.htm"&gt;MapView—ArcGIS Pro | Documentation&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/513021_pastedImage_2.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 17:44:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618028#M48216</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T17:44:06Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618029#M48217</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just check the type of the object or class inheritance:&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; type&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;activeView&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;&lt;SPAN class="keyword token"&gt;class&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'arcpy._mp.Layout'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;gt;&amp;gt;&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt; isinstance&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;activeView&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;_mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;Layout&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="token boolean"&gt;True&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;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 02:24:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618029#M48217</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2021-12-12T02:24:17Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618030#M48218</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks so much Joshua!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 18:10:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618030#M48218</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T18:10:30Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618031#M48219</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If my response answered your question, please mark it Correct to cloud out the question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 19:16:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618031#M48219</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-11-10T19:16:27Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618032#M48220</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Just did, thanks. Had been away from my computer...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 19:19:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618032#M48220</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T19:19:36Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618033#M48221</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Once I've got the activeView how do I grab the name of the MapView or Layout?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 21:00:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618033#M48221</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T21:00:56Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618034#M48222</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;view = aprx.activeView&lt;/P&gt;&lt;P&gt;name = view.map.name&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:15:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618034#M48222</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-11-10T22:15:52Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618035#M48223</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ah .map.name&lt;/P&gt;&lt;P&gt;I was trying just .name&lt;/P&gt;&lt;P&gt;Suppose it makes sense when you think about it though.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Are these properties documented anywhere? Then only documentation I could find about activeView is basicallly the page I linked in the original question.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 22:20:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618035#M48223</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T22:20:29Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618036#M48224</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It is all in the documentation.&amp;nbsp; The &lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapview-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/mapview-class.htm"&gt;MapView—ArcGIS Pro | Documentation&lt;/A&gt; documentation shows a "map" property that returns a &lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/map-class.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/map-class.htm"&gt;Map—ArcGIS Pro | Documentation&lt;/A&gt; object that has a "name" property.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You just need to follow the bread crumbs. &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 23:01:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618036#M48224</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-11-10T23:01:44Z</dc:date>
    </item>
    <item>
      <title>Re: aprx.activeView (MapView or Layout)</title>
      <link>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618037#M48225</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;True. So I came up with the following:&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="513050" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/513050_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;When the active view is a map it displays the map name and when the active view is a layout it displays the layout name.&lt;/P&gt;&lt;P&gt;I was thinking that getting the name of the active layout should be mv.layout.name but no it's just mv.name&lt;/P&gt;&lt;P&gt;Logically it doesn't really make sense to me, but it works and I'm happy with that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for all your help &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2020 23:34:56 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/aprx-activeview-mapview-or-layout/m-p/618037#M48225</guid>
      <dc:creator>ChrisHolmes</dc:creator>
      <dc:date>2020-11-10T23:34:56Z</dc:date>
    </item>
  </channel>
</rss>

