MapInfo Tutorial Home
Section Four
Section Four: Advanced Features
Part Three: MapBasic
MapBasic
- MapInfo has its own programming language, MapBasic. There is no need to use MapBasic for simple commands, as these can be performed using menu options. However, more complex analysis, and particularly repetitive analysis, may require MapBasic. MapBasic does not automatically come with MapInfo, and there is not a free trial version to download, so you need to seriously consider whether you need MapBasic before purchasing it. It is not easily available commercially, although many universities etc will have it. Nevertheless, it is important that users are aware of its existence.
- MapBasic programs are identifyable by the file extension .mb or .mbx. Examples of MapBasic programs may be found by going to Tools > Run MapBasic Program.
- If you are using a computer with MapBasic, you can open MapBasic from the Start menu (Start > Programs > MapInfo > MapBasic) or from within MapInfo by going to Options > Show MapBasic Window.
- MapBasic may be used as a text editor to type in program statements and save these as source code, as a compiler to check the validity of the code, and to link modules togethter to form complex operations.
- To compile your source code in MapInfo go to File > Comile from File, or to compile your source code in MapBasic go to Project > Compile Current File. This will bring up a dialog box to tell you your program has been compiled successfully. Click OK.
- To run your program (or any of the example programs which come with MapInfo) go to File > Run MapBasic Program in MapInfo.
- An overview of MapBasic can be found here on the MapInfo website, while details of how to buy MapInfo products can be found by emailing [email protected].
Acknowledgements.
Section Four
MapInfo Tutorial Home