Quantcast
Channel: Forums - Python
Viewing all articles
Browse latest Browse all 2485

Set scale in python

$
0
0
Hi all,

this is my code:

..
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
arcpy.RefreshActiveView()
arcpy.RefreshTOC()
mxd.save()

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.

Jose.

Viewing all articles
Browse latest Browse all 2485

Latest Images

Trending Articles



Latest Images