The MapBasic window does not everything you do, especially more complex statement tend 
to escape the MapBasic window recorder.

If you want to create points from coordinates in two columns you can do it in this way:
Write the 2 lines that not have a ping (') at the start into the MapBasic window after 
the lines automatically created by MapInfo.
You execute the lines by placing the cursor somewhere in the line and then hit ENTER.

'Here the table has been made mappable. This should be visible in the MapBasic window
'Create Map From ....... 
'Now we need to tell MapINfo to use the projection specified above when making the 
table mappable
' Replace <mytable< with the name of your table
Set CoordSys Table <mytable>
'Now we need to create the points, again replace <mytable> with the name of the table 
and
'<myXcol> and <myYcol> with the names of the columns holding the X- og Y coordinates.
Update <mytable> Set Obj = CreatePoint(<myXcol>, <myYcol>)

HTH,
Peter Horsb�ll M�ller
GIS Developer
Geographical Information & IT

COWI A/S
Odensevej 95
DK-5260 Odense S
Denmark
 
Tel     +45 6311 4900
Direct  +45 6311 4908
Mob     +45 5156 1045
Fax     +45 6311 4949
E-mail  [EMAIL PROTECTED]
http://www.cowi.dk

*****CHANGE OF ADDRESS - COWI's offices in Odense are now under the same roof*****
On December 8th. 2003, Geographical Information & IT moved from Rugaardsvej 55, 5000 
Odense C to Odensevej 95, 5260 Odense S. 
Please note our new telephone, direct and telefax numbers.



> -----Original Message-----
> From: Scott Daugherty [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, January 28, 2004 9:03 PM
> To: Map Info List
> Subject: MI-L Mapbasic window and creating points from dbf
> 
> 
> Hi
> I have a question about creating points from a dbf file.  I 
> opened mapbasic window in MI to see the code generated for 
> opening dbf then creating points and finaly displaying in map 
> window.  When I ran the map basic code no points were made.  
> I notice that I have to specify the fields for the X and Y 
> coordinates in MI's dialog box and no code was generated for 
> this.  I see that MI dialog defaults to the first two number 
> fields. What is the MB code to specify the exact fields X and 
> Y or is that not available in MI MB window?
> 
> Scott Daugherty
> 
> 
> 
> ---------------------------------------------------------------------
> List hosting provided by Directions Magazine | 
> www.directionsmag.com | To unsubscribe, e-mail: 
> [EMAIL PROTECTED]
> For additional commands, e-mail: 
> [EMAIL PROTECTED]
> Message number: 10132
> 
> 
> 

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

Reply via email to