In the transition from arcpy.mapping to arcpy.mp there doesn't seem to be a way to get the extent (in order to calculate the center) of the current map.The camera extent only applies to layouts and MapFrames.
Does anyone know how to get around this?
Something like
aprx<SPAN class="operator token">=</SPAN>arcpy<SPAN class="punctuation token">.</SPAN>mp<SPAN class="punctuation token">.</SPAN>ArcGISProject<SPAN class="punctuation token">(</SPAN><SPAN class="string token">"CURRENT"</SPAN><SPAN class="punctuation token">)</SPAN>
mapView <SPAN class="operator token">=</SPAN> aprx<SPAN class="punctuation token">.</SPAN>listMaps<SPAN class="punctuation token">(</SPAN><SPAN class="punctuation token">)</SPAN><SPAN class="punctuation token">[</SPAN><SPAN class="number token">0</SPAN><SPAN class="punctuation token">]</SPAN>
extent <SPAN class="operator token">=</SPAN> mapView<SPAN class="punctuation token">.</SPAN>extent<SPAN class="line-numbers-rows"><SPAN></SPAN><SPAN></SPAN><SPAN></SPAN></SPAN>
Is this possible in pro?