Hi Addison!

I could not make your example work in 6.5 either, and my suspicion was
right. You need to explicitly tell MapInfo to use the right coordinate
system, setting it for the map window is not enough.
Se altered code below.
HTH, Mats.E

MBcode***********************************
Declare Sub Main

Sub Main

        Dim CommandString as String
        Dim Polygon as Object

        Create Table Extraction (Extraction_File Char(20), Section
Char(20),Win_Away Float, Win_Toward Float) File "C:\regions.tab"

        CommandString = "Create Map for extraction CoordSys Earth Projection 8, 13,
7, 123, 0, 0.9996, 500000, 10000000"
        Run Command CommandString

        'explicitly set MI to use the right Coordinate system
        Set CoordSys Table extraction

        Set Distance Units "m"

                Create Region  Into Variable Polygon  1 4 ( 500347, 6000000 )( 500200,
7000000 )( 600000, 7000000)(600000, 6000000 )

                Insert Into  Extraction (Object)  Values (polygon)

End Sub
END MBcode********************************

:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:Email/ [EMAIL PROTECTED]                            ICQ#9517386:
:---------------------------------------------------------------------:
:Mail/ GISKRAFT, Mats Elfstroem, Vaepplingv 21, SE-227 38 LUND, SWEDEN:
:Phones: +46 46 145959, +46 70 595 3935                               :
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::


-----Ursprungligt meddelande-----
Fr�n: Addison, Howard [mailto:[EMAIL PROTECTED]]
Skickat: den 26 augusti 2002 02:57
Till: Mapinfo List (E-mail)
�mne: MI-L MBX Problems from 6.5 to 7


Hi Listers

I have a problem. I have several mbx's that create points/lines/regions from
reading info from text files and then creating the required objects. They
work fine in Mapinfo 6.5 but don't create the objects correctly in MapInfo
7.

I recompiled the mbx's in Mapbasic 7 (with no errors) still the same
results.

So I wrote a short bit of code to try and sort out the problem.

Basically Create a table

Make it mappable. Australia Map Grid - Zone 51 AGD84

Create a region

Add it to the table.


Works fine in 6.5 but in 7 the region ends up at 500,000mE and
19,998,000.59mN. regardless what coords I put in.


Anyone got any ideas.


Many thanks

Howy




Declare Sub Main

Sub Main

        Dim CommandString as String
        Dim Polygon as Object

        Create Table Extraction (Extraction_File Char(20), Section Char(20),
Win_Away Float, Win_Toward Float)
        File "C:\regions.tab"

        CommandString = "Create Map for extraction CoordSys Earth Projection
8, 13, 7, 123, 0, 0.9996, 500000, 10000000"
        Run Command CommandString

        Set Distance Units "m"

                Create Region  Into Variable Polygon  1
                4 ( 500347, 6000000 )( 500200, 7000000 )( 600000, 7000000)(
600000, 6000000 )

                Insert Into  Extraction (Object)  Values (polygon)

End Sub


HOWARD ADDISON
CAD/GIS CO-ORDINATOR
AngloGold Australia Limited
Level 13, St Martins Tower
44 St Georges Terrace

Telephone (08) 94254649
Fax (08) 94254663
<mailto:[EMAIL PROTECTED]>



_______________________________________________________________

This e-mail message contains confidential information which is
intended for the use of the person to whom it is addressed.
If you received it in error, please notify the sender and
delete the material from any computer.  Any disclosure,
re-transmission, dissemination or any other use of this
information is strictly prohibited.
_______________________________________________________________


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




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

Reply via email to