dataframe.scale problem

3301
4
01-11-2012 06:18 AM
markus_tischler
New Contributor
I have a problem concerning dataframes and the scale issue (unfortunately, im just a beginner)

several mxd's consist of several dataframes. The DataFrameOptions in the tab "DataFrame" - "Extent" are set to "Fixed Scale" (done manually).

As i want to change the scale of the dataframes (besides other arcpy.mapping things), the invocation dataframe.scale = xxxx causes the error "DataFrameObject: Error in setting scale value".
But if the DataFrameOptions in the tab "DataFrame" - "Extent" are set to "automatic", the statement dataframe.scale = xxxx works fine.

Is there a possibility to set/change this "fixed scale option" via python, or any other approach to change the "Fixed Scale"?
my forum research didnt bring me any progress so far....

Thanks in advance,
greetings

tom
Tags (2)
0 Kudos
4 Replies
AndrewChapkowski
Esri Regular Contributor
Tom,

You cannot change that property via python in ArcGIS 10. The best thing to do is set the 'Fixed Scale' option to 'Automatic' manually.
0 Kudos
CharlesFried
New Contributor III

So I have to manually change the data frame extent to "Automatic" on hundreds of MXDs?  That just sucks!

0 Kudos
JeffBarrette
Esri Regular Contributor
Andrew is correct, you can't change the fixed extent option via arcpy,mapping. By design we even block you from trying to change the extent via arcpy.mapping if the map document was authored to be fixed extent.

We are trying to keep arcpy.mapping simple and NOT have it do everything that can be done in ArcMap (thats ArcObjects).  But I am curious if you have a scenario that requires that you really need to toggle this "fixed extent" setting.  With arcpy.mapping, you have total control over extent, scale, etc so it simply makes the most sense to me that you set the extent to automatic but please let me know otherwise.

Jeff
0 Kudos
markus_tischler
New Contributor
Andrew and Jeff, thanks for ur answers.

Yes it makes sense.

My scenario is, that about 180 mxd's are produced manually a while ago (and set the scale of all Dataframes to fixed 1:10'000)
Now the map designer came to me, telling me she wants, besides other changes which work just perfeclty, to change the scale to 5'000 in some of the dataframes...

so in my situation it would be sweet to adress the scale via arcpy eventhough its previously set to fixed...
arcobjects - i only know it a tiny bit from java, but could i use python aswell?

greetings
thomas
0 Kudos