<?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 zoomToSelectedFeatures () scale differences 'CURRENT' and 'mxd_path' in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/zoomtoselectedfeatures-scale-differences-current/m-p/696827#M54012</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I encountered a problem that zoomToSelectedFeatures() works differently in ArcMap and using ArcPy explicitly in another Python editor having the exact same dataset (one point layer in the data frame) in the MXD file.&amp;nbsp; I tested the same code except MXD path ('CURRENT' in ArcMap) and got different scales.&amp;nbsp; 1:2,167 in ArcMap and 1: 4,053 using ArcPy in another Python editor.&amp;nbsp; I couldn't figure out what was causing the problem.&amp;nbsp; I would very much appreciate any assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument(mxd_path)
df = arcpy.mapping.ListDataFrames(mxd, 'Layers')[0]
df.zoomToSelectedFeatures()
print df.scale
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 05:19:45 GMT</pubDate>
    <dc:creator>Anonymous User</dc:creator>
    <dc:date>2021-12-12T05:19:45Z</dc:date>
    <item>
      <title>zoomToSelectedFeatures () scale differences 'CURRENT' and 'mxd_path'</title>
      <link>https://community.esri.com/t5/python-questions/zoomtoselectedfeatures-scale-differences-current/m-p/696827#M54012</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I encountered a problem that zoomToSelectedFeatures() works differently in ArcMap and using ArcPy explicitly in another Python editor having the exact same dataset (one point layer in the data frame) in the MXD file.&amp;nbsp; I tested the same code except MXD path ('CURRENT' in ArcMap) and got different scales.&amp;nbsp; 1:2,167 in ArcMap and 1: 4,053 using ArcPy in another Python editor.&amp;nbsp; I couldn't figure out what was causing the problem.&amp;nbsp; I would very much appreciate any assistance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument(mxd_path)
df = arcpy.mapping.ListDataFrames(mxd, 'Layers')[0]
df.zoomToSelectedFeatures()
print df.scale
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 05:19:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zoomtoselectedfeatures-scale-differences-current/m-p/696827#M54012</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2021-12-12T05:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: zoomToSelectedFeatures () scale differences 'CURRENT' and 'mxd_path'</title>
      <link>https://community.esri.com/t5/python-questions/zoomtoselectedfeatures-scale-differences-current/m-p/696828#M54013</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This is probably going to be due to the size of the display for the map. When you have ArcMap open the map will possibly be a different size than when you're accessing it remotely. As the size of the map being rendered increases or decreases the scale will change. To show this I've taken screenshots of the sample map document on my machine. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scale at full screen&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="full.png" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/146049_full.png" style="width: 620px; height: 336px;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Scale at half screen&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="half.png" class="image-2 jive-image" src="https://community.esri.com/legacyfs/online/146050_half.png" style="width: 620px; height: 672px;" /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 Nov 2015 19:35:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/zoomtoselectedfeatures-scale-differences-current/m-p/696828#M54013</guid>
      <dc:creator>FreddieGibson</dc:creator>
      <dc:date>2015-11-20T19:35:45Z</dc:date>
    </item>
  </channel>
</rss>

