1 - yes it is the MapBasic language, sorry for any confusion. a compiled MapBasic program (MBX) is what i meant you don't need to do some of this stuff from within VC.
2 - have sent some material your way. 4 - a table within MapInfo has spatial objects associated with it. in my previous example it was assuming you had a table with a NOTE field, and it INSERTED stuff in it according to what was listed in the parentheses... "( Obj, Note )" ... which means the first parameter it was expecting was something describing the MAP OBJECT, and the second parameter was the data which was to be inserted into the field in the table. 5 - as above, the inserted object is BOTH a map object AND a record in your table. have BOTH the map window AND the table browser open to see the relation. 6 - all objects are temporary... but that is more of a philosophical viewpoint. put it this way, if you delete it, then it was temporary. otherwise, use the COSMETIC layer. (you really need to do some reading and playing mate) 7 - X and Y already IS lat/long... i think i'm misunderstanding. do you mean change the projection? i'm no guru on that stuff, but it'll be something like " .DO set map coordsys blah " or something. 8 - you'll need to use the reference material and do some messing around with the MabBasic window to figger out the actual values, but your code will be something like: .DO "set style pen (4,2,255)" (medium fatness blue line) .DO "Set Style Symbol MakeFontSymbol(38,4718736,48," & Chr$(34) & "MapInfo Oil&Gas" & Chr$(34) & ",256,0)" (a big purple crosshair) hope that helps some. ash -----Original Message----- From: Fabio Cabella [mailto:[EMAIL PROTECTED] Sent: Thursday, 28 August 2003 11:58 PM To: [EMAIL PROTECTED] Subject: RE: MI-L Pushpin Some other newby questions: 1 - I was assuming that the language used in the 'Do' method was MapBasic, isn't it? 2 - where can I find online references for this language? 3 - can someone send me the MapBasic.h file, I can't find it anywhere (it should have all command's numbers defined)? Back to pushpins and Ashley's suggestions: 4 - why should I work with the table? (May be I'm missing the relations between tables and maps) 5 - does the inserted object (i.e. my pushpin) take place as a permanent record in my table? 6 - how can I do temporary objects? 7 - how can I (with the 'Do' command) set the X, Y as Latitude, Longitude? (i.e. Map|Options|Projection|Latitude / Longitude)? 8 - how do I set the default point objects styles? (i.e Options|Symbol Style) Any help will be greatly appreciated!!! Thanks again, Cabbi At 10:59 28/08/2003 +0930, you wrote: >if you set a reference to mapinfo within VC you can communicate with it >directly without bothering with MapBasic (MBX's), just using the .DO and >.EVAL and .RUNMENUCOMMAND methods. > >i use visual basic, but this command will be much the same, so see if you >can figger out what goes on from this little snippet. > >################################################ > > MI.Do "insert into MyTable (Obj, Note) _ > values ( createpoint( X , Y ), """stuff"""" > >################################################ > >of course, X and Y are variables with your coordinates, and "stuff" goes >into a field in your table called "Note", assuming you have one. if you >have autolabel set on, then it will appear on your map immediately, >otherwise you can turn the label on manually. if you want it to LOOK like a >pushpin, then you have to set the default Point object BEFORE running this >command. > >if you need further info about getting the MapInfo object and stuff, then >you've got some more research and fiddling to do, but we can help with that >too. > >ash > >-----Original Message----- >From: Fabio Cabella [mailto:[EMAIL PROTECTED] >Sent: Thursday, 28 August 2003 12:01 AM >To: [EMAIL PROTECTED] >Subject: MI-L Pushpin > > >Hi all, > >I'm new to the list and really new to MapInfo so need a little help! >My application (VC++ 6.0) has do show a pushpin (any symbol with a label) >of a specific latitude-longitude pair on a map. >Well, if I'm right (please correct me if not) I have to write a macro with >MapBasic and call the 'Do' method on my DMapInfo COM object. >Can anyone give me a little example or a good starting point! > >TIA, >Cabbi --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 8193 --------------------------------------------------------------------- List hosting provided by Directions Magazine | www.directionsmag.com | To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] Message number: 8211
