Below is some VB code;
msg =
"Include ""mapbasic.bas"" "
mi.do msg
msg = "MapperInfo(" & mapid & ", MAPPER_INFO_SCALE)"
mapscale = Val(mi.Eval(msg))
txtMapBasic.Text = mapscale
mi.do msg
msg = "MapperInfo(" & mapid & ", MAPPER_INFO_SCALE)"
mapscale = Val(mi.Eval(msg))
txtMapBasic.Text = mapscale
where mi is MapInfo.Application and mapid is the
map window id
I'm actually after the paper scale of an associated
layout window but can not find a command for a direct query. So i figured i
would obtain the scale of the map window and thump it through the provided
formula and get the layout scale.
the question i ask is two fold:
1. I am not including the header file correctly, i
am not sure where it goes. Or if it is 'mapbasic.def' or 'mapbasic.bas' - or
where i put the code. Do i send a message to MI or is it a header file for
VB?
2. Is there a better way of obtaining layout scale?
(scale on paper output)
regards,
andrew bailey
gis officer, london borough of
hackney
