AnsweredAssumed Answered

Set scale in python

Question asked by pyonono on Jul 22, 2013
Latest reply on Mar 26, 2015 by rkammer
Hi all,

this is my code:

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

it should work, right?

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:

df.scale = 20000 does not work at all!! (df is the DATA FRAME previously created)

Any suggestions?

Thanks in advance.