<?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: Set scale in python in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285382#M22048</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First, thanks to everybody for considering my issue. then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.- What I am trying to do is exporting into a PDF my Layout View using python. The scale of this map may be 1:20.000 (1:20000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.- Before executing the script: Data Frame Properties --&amp;gt; Extent : Automatic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.- Before executing the script: The scale is set to 30000 (purposely) in order to see if the script works or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4.- The code would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
cut = arcpy.GetParameterAsText(0) # from TOC by Default (LAYER).
dir = arcpy.GetParameterAsText(1) # folder type
list2 = [0,6,7,8,9] # we list the positions of the elements that not may appear in this map.
for i in list2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = arcpy.mapping.ListLayers(mxd,"","")&lt;I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.visible = False # we turn off these layers. CUT IS NUMBER 5, SO IT IS NOT AFFECTED HERE
zoom = arcpy.mapping.ListLayers(mxd,cut,"")[0] # we locate cut (Study area extent) in TOC.
df.extent = zoom.getExtent() # Zoom to Layer
df.scale = 20000 # we set the scale of the output to 1:20,000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
mxd.save()
arcpy.mapping.ExportToPDF(mxd, dir + "\file.pdf") # we export the map into a PDF file.&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5.- OK, when I run the script, I look at the Map Scale (Data View) and the sequence I see with my own eyes is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....1:30,000 (good).......1:20,000 (good!).....1:8,223..(not good).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Result: PDF Scale --&amp;gt; 1:8,223&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is all I can say so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 13:48:15 GMT</pubDate>
    <dc:creator>josesanchez1</dc:creator>
    <dc:date>2021-12-11T13:48:15Z</dc:date>
    <item>
      <title>Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285377#M22043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;this is my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;..&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;zoom = arcpy.mapping.ListLayers(mxd,cut,"")[0] # we locate cut layer in TOC. cut is a variable
df.extent = zoom.getExtent() # Zoom to Layer zoom
df.scale = 20000 # we set the scale to 1:20,000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
mxd.save()&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;it should work, right?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Well, when I open the map in PDF that I have generated and..time after time, I see Scale = 1:8,223, which means that after the Zoom to Layer, the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;df.scale = 20000 does not work at all!! (df is the DATA FRAME previously created)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 15:25:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285377#M22043</guid>
      <dc:creator>josesanchez1</dc:creator>
      <dc:date>2013-07-22T15:25:54Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285378#M22044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Are you sure it isn't being set?&amp;nbsp; normally, when you export to pdf, you export the Layout, not the dataframe.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After it has run, open the mxd in ArcMap, switch to data view and see what your "dataframe" scale is set to.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Depending on your constraints, etc. the Layout view scale is not the same as Data frame scale.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 16:52:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285378#M22044</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-07-22T16:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285379#M22045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It sets the scale properly into ArcMap, but not when it goes into the PDF.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.mapping.ExportToPDF(mxd, dir + "\FILE.pdf")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 17:12:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285379#M22045</guid>
      <dc:creator>josesanchez1</dc:creator>
      <dc:date>2013-07-22T17:12:19Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285380#M22046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Sometimes you have to set such settings twice with python&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;(the snake has a bug).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But you say it does seem to change in ArcMap...&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You don't however, provide your ExportToPDF parameters....&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It is also unclear if you are exporting your layout or just a data frame.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Exporting a layout is almost always a better idea.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 17:47:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285380#M22046</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2013-07-22T17:47:28Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285381#M22047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;It sets the scale properly into ArcMap, but not when it goes into the PDF.&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;arcpy.mapping.ExportToPDF(mxd, dir + "\FILE.pdf")&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In where in ArcMap?&amp;nbsp; The layout or the dataframe as you are setting?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Unless you have went into the dataframe properties in ArcMap and set the extent to "Fixed Scale", you will likely never get the same scale for the dataframe that you have for the Layout (which is what is exported to pdf unless you specify otherwise).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you want it to be 1:20000 all the time, just set it in the dataframe properties as fixed scale.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Jul 2013 19:53:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285381#M22047</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-07-22T19:53:12Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285382#M22048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;First, thanks to everybody for considering my issue. then:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1.- What I am trying to do is exporting into a PDF my Layout View using python. The scale of this map may be 1:20.000 (1:20000)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2.- Before executing the script: Data Frame Properties --&amp;gt; Extent : Automatic&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3.- Before executing the script: The scale is set to 30000 (purposely) in order to see if the script works or not.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4.- The code would be:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0]
cut = arcpy.GetParameterAsText(0) # from TOC by Default (LAYER).
dir = arcpy.GetParameterAsText(1) # folder type
list2 = [0,6,7,8,9] # we list the positions of the elements that not may appear in this map.
for i in list2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = arcpy.mapping.ListLayers(mxd,"","")&lt;I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.visible = False # we turn off these layers. CUT IS NUMBER 5, SO IT IS NOT AFFECTED HERE
zoom = arcpy.mapping.ListLayers(mxd,cut,"")[0] # we locate cut (Study area extent) in TOC.
df.extent = zoom.getExtent() # Zoom to Layer
df.scale = 20000 # we set the scale of the output to 1:20,000
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
mxd.save()
arcpy.mapping.ExportToPDF(mxd, dir + "\file.pdf") # we export the map into a PDF file.&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;5.- OK, when I run the script, I look at the Map Scale (Data View) and the sequence I see with my own eyes is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;....1:30,000 (good).......1:20,000 (good!).....1:8,223..(not good).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Result: PDF Scale --&amp;gt; 1:8,223&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is all I can say so far.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285382#M22048</guid>
      <dc:creator>josesanchez1</dc:creator>
      <dc:date>2021-12-11T13:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285383#M22049</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;First, thanks to everybody for considering my issue. then:&lt;BR /&gt;&lt;BR /&gt;1.- What I am trying to do is exporting into a PDF my Layout View using python. The scale of this map may be 1:20.000 (1:20000)&lt;BR /&gt;&lt;BR /&gt;2.- Before executing the script: Data Frame Properties --&amp;gt; Extent : Automatic&lt;BR /&gt;&lt;BR /&gt;3.- Before executing the script: The scale is set to 30000 (purposely) in order to see if the script works or not.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;5.- OK, when I run the script, I look at the Map Scale (Data View) and the sequence I see with my own eyes is:&lt;BR /&gt;&lt;BR /&gt;....1:30,000 (good).......1:20,000 (good!).....1:8,223..(not good).&lt;BR /&gt;&lt;BR /&gt;Result: PDF Scale --&amp;gt; 1:8,223&lt;BR /&gt;&lt;BR /&gt;That is all I can say so far.&lt;BR /&gt;&lt;BR /&gt;Jose.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, understand the 1:30,000 as you set it manually in the mxd&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;the 1:20,000 is what your script tells it to do&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Where is the 1:8223 coming from?&amp;nbsp; you say you get all of them, but&amp;nbsp; you only have one spot in the code that is making a change, why (or when) do you get three different values?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Just to make sure, you do understand, that, unless you set Data Frame Properties --&amp;gt; Fixed Scale, you will likely "never" get the Layout scale to be exactly 1:20000 as long as you are also zooming to some extent in the dataframe?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;R_&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jul 2013 15:19:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285383#M22049</guid>
      <dc:creator>RhettZufelt</dc:creator>
      <dc:date>2013-07-23T15:19:35Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285384#M22050</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Well, I got it!. Thanks anyway for all your comments.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;NOW, my PDF does not have any 1:8.223, just 1:20.000!!!!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;After the code lines:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;list2 = [0,6,7,8,9] # we list the positions of the elements that not may appear in this map.
for i in list2:
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr = arcpy.mapping.ListLayers(mxd,"","")&lt;I&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; lyr.visible = False # we turn off these layers.
zoom = arcpy.mapping.ListLayers(mxd,cut,"")[0] # we locate cut (Study area extent) in TOC.&lt;/I&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;and before the line:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;df.extent = zoom.getExtent()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I put:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;arcpy.RefreshActiveView()
arcpy.RefreshTOC()&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, in the end, I have learned that after turning off layers in TOC, you must refresh everything..in order to get the desired scale.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jose.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:48:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285384#M22050</guid>
      <dc:creator>josesanchez1</dc:creator>
      <dc:date>2021-12-11T13:48:18Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285385#M22051</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I would like to do something along this line and query data frame scale and put it in definition query.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e. I would like create an attribute and call it vscale&amp;nbsp; ( visible scale) can be anything this is arbitrary.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would like to create a definition query as such.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vscale &amp;gt;= CurrentDataFrameScale&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So when I am at or above whatever value i have in vscale my feature becomes visible. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 18:35:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285385#M22051</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2015-03-23T18:35:15Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285386#M22052</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I don't think you can combine a definition query and visible scale range with Python like that. You could use that definition query but it would never change the visible scale range in the MXD on its own. I recommend you try using &lt;A href="http://resources.arcgis.com/en/help/main/10.1/00s5/00s500000013000000.htm"&gt;layer files&lt;/A&gt;. When you create a layer file, it will save the visible scale range you set (as well as definition queries, symbology, labels, etc). So instead of adding the feature class from a geodatabase, just add it from the layer file and it will already have all that stuff set up. If you want your visible scale range to change, you'd have to save over the layer file with the new visible scale range set.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Your other option would be to run a Python script that checks for a vscale field in all (or certain) layers in the map and sets the visible scale range; it would have nothing to do with a definition query.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 19:01:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285386#M22052</guid>
      <dc:creator>BlakeTerhune</dc:creator>
      <dc:date>2015-03-23T19:01:41Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285387#M22053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hee hee layer files is exactly what I have been trying to get away from for well over a decade.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have actualy been posting this question ever now and then for a long long time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have one particular mxd from which I generate .pdf files for one of my clients.&amp;nbsp;&amp;nbsp; I have 4 levels of visibility for which I want certain features of a feature class to be visible.&amp;nbsp; so as the scale gets larger more features become visible.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I normally have 5 features that would be to clutterd to show all of them at a small scale.&amp;nbsp;&amp;nbsp; So i have them in the mxd 4 times and using definition querys make certain features visible.&amp;nbsp; When I drop below 1:20,000 the first layer goes gray and the second layer is visible with all features from the first and more now visible.&amp;nbsp; It also then controls lables.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The major issue is when someone suddently wants a larger format product I have to redefine all the scale visibility or even worse when they want a change in labels I need to make that change multiple times for each copy of the attribute.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;etc....&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 19:14:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285387#M22053</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2015-03-23T19:14:59Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285388#M22054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It has to be possible&amp;nbsp; Your data frame is constantly returning you current scale.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you scroll in and out if is instantly updated.&amp;nbsp; Also when you put in scale text or scale bar that changes.&amp;nbsp; so the system has to be constantly quering it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Mar 2015 19:16:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285388#M22054</guid>
      <dc:creator>RobertBorchert</dc:creator>
      <dc:date>2015-03-23T19:16:39Z</dc:date>
    </item>
    <item>
      <title>Re: Set scale in python</title>
      <link>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285389#M22055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try setting the data_frame parameter of the ExportToPDF function to "PAGE_LAYOUT". This will export the layout view in the mxd. If this parameter in not set it will default to the data frame.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.mapping.ExportToPDF(mxd, dir + "\file.pdf", "PAGE_LAYOUT")&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 14:35:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/set-scale-in-python/m-p/285389#M22055</guid>
      <dc:creator>RichardKammer</dc:creator>
      <dc:date>2015-03-26T14:35:36Z</dc:date>
    </item>
  </channel>
</rss>

