aprx.activeMap

2370
2
Jump to solution
11-03-2020 09:53 PM
ChrisHolmes
Occasional Contributor III

Hello,

I am using Arcgis Pro 2.4.3 and have the following code:

aprx = arcpy.mp.ArcGISProject("CURRENT")
mv = aprx.activeMap

arcpy.AddMessage(mv.name)

I'm using this to get the active map window, but what I'm having trouble figuring out is how do I determine if the "active" window is a layout window. If the above is used on a layout window it will return the name of the map that the active map frame is based on in the layout.

It's tricky searching the online documentation when I'm not using the current version of Pro. There is a activeView property which I think does what I want to do, but I don't think it's available in 2.4.3.

Thanks!

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
DanPatterson
MVP Esteemed Contributor

you would have to go through

What's new in ArcGIS Pro 2.6—ArcGIS Pro | Documentation 

What's new in ArcGIS Pro 2.5—ArcGIS Pro | Documentation 

and check the Python section(s) if there, to see if anything was added to arcpy.

Alternately a simple dir( ) on an object will provide a list of what is available in terms of an objects properties and methods


... sort of retired...

View solution in original post

0 Kudos
2 Replies
DanPatterson
MVP Esteemed Contributor

you would have to go through

What's new in ArcGIS Pro 2.6—ArcGIS Pro | Documentation 

What's new in ArcGIS Pro 2.5—ArcGIS Pro | Documentation 

and check the Python section(s) if there, to see if anything was added to arcpy.

Alternately a simple dir( ) on an object will provide a list of what is available in terms of an objects properties and methods


... sort of retired...
0 Kudos
ChrisHolmes
Occasional Contributor III

Thanks for the info Dan.

I was able to get upgraded to 2.6.2 last Friday and can now use activeView (yay).

0 Kudos