Hi, Garret.
Essentially, I have a VFP database, containing such things as bus routes, bus stops and public facilities, that feature lat/long. The system runs in VFP. We have MapInfo maps and we have MapBasic. One of the main tasks needed is the ability to plot, say, bus routes on a map (click an move on to the next point), and for the bus route to be stored in my database. Another task is to click on a, say, facility featured on a map and to be able to display its details (from the DB) in a pop-up box or similar.
I've only just started to get to grips with MapBasic. There is a feature called "Integrated Mapping" whereby MapBasic command strings can be built up and then called from other languages (VB and C++ are given as examples), via OLE.
I've tried just to get started by calling up an existing MapInfo map, using a VB example in the MapBasic docn., but changing it to work in VFP. No Joy - I just get syntax errors (unexplained). There are no VFP examples in the docn. (typical poor relation) and very little help in the VFP docn (that I can find)
Below I include my VFP interpretaion of a VB example. The last 2 lines (2 approaches to the same thing) give a syntax error:
-------------------------
LOCAL lcPath, lcAddPath
LOCAL loMapInfo AS object
lcPath = SET("PATH")
lcAddPath = lcPath + ";TestBed\MapInfoMaps"
Set Path To &lcAddPath
loMapInfo = CREATEOBJECT( "MapInfo.Application")
lcState1 = 'Open Table "UK_NUTS2" interactive'
*loMapInfo.do lcState1
loMapInfo.Do 'Open Table "UK_NUTS2" interactive'
----------------------------
Once I get a handle on this thing I can probably progress from therein - I'm used to doing such. At the moment I'm not too skilled in OLE auotomation either!
Any help you could give would be most appreciated
Best regards
Terry
- Whoever said that women are the weaker sex never tried to wrest the bedclothes off one in the middle of the night
- Worry is the interest you pay, in advance, for a loan that you may never need to take out.