I thought i'd summarise my look into automated
layout scales. The following was the only method i could find to work - but
its a bit of a bodge job...
firstly, there was no way of querying the layout
for details on particular fram objects, namely my map window. But i could use
MapperInfo to retrieve some scale value from the map window. The trick is to
make the map window and the map frame in the layout window the same size in
width and height. This is good news because it now means that the scale in each
window is the same. Unfortunately, and i don't know why, the MapperInfo_Scale
function was returning a number that was correlating with a change in scale but
was at a different ratio. For example, the true scale was 1:500 but my
MapperInfo_scale output was giving a reading of 6.2. I checked all my units and
couldn't find any faults. But testing the results out at different scale
settings provided me with a formula:
true scale = (83.028 x Mapscale)
+ 0.0124
Now the true scale of the map has been found this
is the same as the map frame in the layout and a text string can be placed
accordingly. Use CInt(x) to turn the value into a integer and whack into the
layout.
The only annoying thing that i don't understand is
how to make a window active without altering any of its settings or by using the
user to clcik on it. ArcView's avenue had SetActiveDocument and i'm looking for
a compromise statement.
regards,
andrew bailey
gis officer
london borough of
hackney
