Hi John,

The layout frame objects does not contain a static scale
parameter. Rather this is dynamically calculated as (normally)
the map zoom width divided by the frame width.

All layout objects, including the frame object, can be accessed
via the layout window's cosmetic layer (only layer there is), and
querying the frame object will get you both the width of the frame
and the (map) window reference. This reference (map window ID)
can be used to get the map zoom width.

Similarly changing the scale involves either changing the frame width
(not likely) or changing the map window zoom. Usually I use the "clone
map" feature to avoid messing up my original map window.

After that it's simple arithmetic. One possible pitfall is, if the map
doesn't
"fill" the frame, in which case the aspect (width vs. height) of the map
window may cause the scale to be (map "vertical zoom") / (frame height)
instead.

Regards
Lars Nielsen

**********************************************************
Lars Nielsen                                [EMAIL PROTECTED]
Development Manager, Special Products Contact
Kampsax Geoplan Odense               http://www.mapinfo.dk
Authorized MapInfo Distributor in Denmark & Norway
Address: Rugaardsvej 55, DK-5000 Odense C
Telephone: +45 6313-5000           Facsimile +45 6313-5090
**********************************************************




J Tinker <[EMAIL PROTECTED]> on 26-02-99 01:38:28

To:   "'MapInfo-L'" <[EMAIL PROTECTED]>
cc:
Subject:  MI: Frame Object - Scale on Paper




Greetings,
Has anyone found a way to programmatically query a Frame Object for the
value that appears as "Scale on Paper" (if you double click a frame
object on a layout page)?
I'm trying to determine (via MapBasic):
1) what the scale will be when the layout is printed;
2) possibly change the scale (to an integer) via code
Any thoughts are greatly appreciated.
======================================
             John Tinker    [EMAIL PROTECTED]
  SCHLOSSER GEOGRAPHIC SYSTEMS, INC.
                  Two Union Square
             601 Union St, Suite 2750
                  Seattle, WA  98101
     (206) 224-0800 voice / (206) 467-0458 fax
     http://www.sgsi.com   [EMAIL PROTECTED]
----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]




----------------------------------------------------------------------
To unsubscribe from this list, send e-mail to [EMAIL PROTECTED] and put
"unsubscribe MAPINFO-L" in the message body, or contact [EMAIL PROTECTED]

Reply via email to