Running a MapBasic Program - MapInfo_Pro - 2023

MapInfo Pro Help

Product type
Software
Portfolio
Locate
Product family
MapInfo
Product
MapInfo > MapInfo Pro
Version
2023
Language
English
Product name
MapInfo Pro
Title
MapInfo Pro Help
First publish date
1985
ft:lastEdition
2023-09-12
ft:lastPublication
2023-09-12T16:39:16.995549

MapBasic is a programming language that you can use to customize or automate Maplnfo Pro. To create MapBasic applications, you need the MapBasic compiler, which is a separate product. However, you do not need the MapBasic compiler to run a MapBasic application.

MapInfo Pro comes with MapBasic applications, which are tools designed to make your work easier, such as:

  • Symbol (SYMBOL.MBX). Creates custom symbol shapes.
  • Scale Bar (SCALEBAR.MBX). Annotates a map with a distance scale.
  • Named Views (NVIEWS.MBX). Assigns a name to the current map view and use that name to return to that view later.
  • Overview (OVERVIEW.MBX). Opens a second Map window that displays an overview of the current map (also referred to as an area detail map).

For a list of the tools that install with MapInfo Pro, see Summary of MapInfo Pro Tools. To run one of these MapBasic tools, see Running a Tool.

To run your own MapBasic application, see Loading/Autoloading External Tools.

Running a MapBasic Program Using a Startup Workspace

You can use a startup workspace to run a MapBasic application. When you want to run a MapBasic application in your startup workspace, you need to create the workspace with a text editor. To do this:

  1. Place the following into an ASCII file:
    !workspace
    !version 700
    run application "someprog.mbx"
  2. Replace "Someprog.app" with the name of the MapBasic application you want to launch from the startup workspace.
  3. Name this file STARTUP.WOR.
  4. Place this file in your MapInfo Pro program directory or in your home directory.
Note: For a comprehensive list of MapBasic functions and statements, click the Help button in the MapBasic window.