I think the problem is to do with the fact that MapInfo has to pass numbers
to VB as strings.

I encountered this problem today and found a way round by passing a
'Format$' statement with my eval statement to force MapInfo to send me the
correct decimal places - something like this:

MyAccessObject.X = MIobj.eval
("Format$(objectgeography(selection.object,1),"0.000000" )")


----- Original Message -----
From: "Simmonds, Ashley (PTB)" <[EMAIL PROTECTED]>
To: "'Mapinfo List (E-mail)'" <[EMAIL PROTECTED]>
Sent: Friday, August 16, 2002 12:43 PM
Subject: MI-L lost decimal places


> please help, this is bugging me to death.
>
> i cannot seem to get mapinfo to give me the X/Y coordinates of a selected
> object with any reasonable level of accuracy.
>
> i use the following code from VB:
>
>     MyAccessObject.X = MIobj.eval ("objectgeography(selection.object,1)")
>
> and it will only give me a float/double to 3 or 4 decimal places.  this is
> nowhere near good enough.
>
>
> if you want to test this for yourself, select an object in mapinfo, type
> this into the MapBasic window:
>
>     print objectgeography(selection.object, 1)
>     print objectgeography(selection.object, 2)
>
> then create a new point in your table, and set the X and Y to the
coodinates
> given in the message window. now compare the locations of the original and
> the evaluated copy.  cool huh?
>
> this is a major problem, as i will be having people updating the X/Y of a
> record in my access table based on a selection they have made in MapInfo,
> but having this oversimplified rounding error makes stuff anywhere between
a
> couple of metres to a couple hundred metres WRONG.
>
> there was already a discussion that i participated in involving something
> along these lines in early May, but i don't think this side of things was
> explored.
>
> basically, how can i get Access to evaluate the current position of a
> selected object in mapinfo with as much accuracy as possible?
>
>
> gramercy
>
> ash
>
>


----------------------------------------------------------------------------
----


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


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

Reply via email to