Hi Nichola

I assume you want to enable a user to enter an OS grid ref in conventional 
(SP123456 etc) form?

If so, you could use a Do Case statement to read the first 2 chars from the 
input string and get the corresponding number.  You could then split the rest 
of the string to get the eastings and northings, prefixing each with the first 
(easting) and second (northing) char from the prefix number - ie: 4123 2456.

I have used a similar process in my Conversion Tools which converts a table of 
conventional grid refs into a mappable table (by creating eastings and 
northings), or allows a user to entre a single grid ref and diplay the location 
on a map.

Conversion Tools can be downloaded from:

- download free:

http://www.bodley.ox.ac.uk/guides/maps/geo_tools.htm

regards

Nigel




On Mon, 04 Apr 2005 12:55:23 +0100 Nichola Shine 
<[EMAIL PROTECTED]> wrote:

> I was wondering whether you would be able to post this on the website?
> 
> I'm trying to create a piece of code in MapBasic that displays a dialog =
> box so that a user can type in coordinates such using the letter prefix =
> such as TR.=20
> 
> Does anybody know how this could be achieved?
> 
> Thanks
> 
> Nichola Shine
> 
> Nichola Shine
> GIS/LPG CUSTODIAN
> Canterbury City Council=20
> Chaucer Road
> CANTERBURY
> Kent
> CT1 1JT
> 
> 
> 
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | www.directionsmag.com |
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> Message number: 15921
> 
> 

__________________________________
Nigel N James
Map Room
Bodleian Library
Broad St
Oxford
OX1  3BG
UK
tel     : +44 1865 277013
fax    : +44 1865 277139 
Visit the award-winning Map Room Home Page at: 
http://www.bodley.ox.ac.uk/guides/maps/


---------------------------------------------------------------------
List hosting provided by Directions Magazine | www.directionsmag.com |
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Message number: 15925

Reply via email to