Hi Mike I found my problem.
I had been using the SET MAP Statement os set the required coord system, however from version 7.x and on that doesn't work anymore. I found this in the MAPBASIC HELP. CoordSys... clause Assigns the Map window a different coordinate system and projection. For details on the syntax of a CoordSys clause, see the separate CoordSys discussion. The MapBasic CoordSys must be set explicitly with a Set CoordSys statement and can be retrieved with the SessionInfo() function Note: When a Set Map statement includes a CoordSys clause, the MapBasic application's coordinate system is automatically set to match the map's coordinate system. In versions prior to 7.x, the following example would set both the Mapper's Coordsys to this UTM system as well as set the underlying MapBasic CoordSys to this system: Set Map XY Units "m" CoordSys Earth Projection 8, 33, "m", -55.5, 0, 0.9999, 304800, 0 In versions 7.x and later, this example would only alter the Mapper's Coordsys and Units and MapBasic Coordsys will be unaffected. Simple ...... When you look in the right place....... Many thanks Howy -----Original Message----- From: Taylor, Michael [mailto:[EMAIL PROTECTED]] Sent: Monday, 26 August 2002 9:07 AM To: Addison Howard Subject: Re: MI-L MBX Problems from 6.5 to 7 Hi I would say that you will need to set the coordsys in the mbx set coordsys 8, 13, 7, 123, 0, 0.9996, 500000, 10000000 bounds (?,?) (?,?) or set coordsys table extraction Mapbasic automatically works in Lat/Long, which can be a right pain. Regards Mike "Addison, Howard" wrote: > > 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 -- Mike Taylor ______________________________________________ GIS Senior Consultant mailto:[EMAIL PROTECTED] Sinclair Knight Merz Limited http:\\www.skmconsulting.com Level 12, Mayfair House Tel: +64 4 473 4265 54 The Terrace Fax: +64 4 473 3369 PO Box 10283,Wellington New Zealand NOTICE: This message contains privileged and confidential information intended only for the use of the addressee named above. If you are not the intended recipient of this message you are hereby notified that you must not disseminate, copy or take any action in reliance on it. If you have received this message in error please notify Sinclair Knight Merz Ltd immediately. Any views expressed in this message are those of the individual sender, except where the sender has the authority to issue and specifically states them to be the views of Sinclair Knight Merz. The recipient is responsible for reviewing the status of the transferred information and should advise Sinclair Knight Merz immediately upon receipt of any discrepancy. The sender makes no warranty regarding the presence of electronic or magnetic data errors or computer viruses, or as to the accuracy or completeness of the data transmitted. _______________________________________________________________ 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: 2659
