Maptitude GISDK Help

Installing and Running Custom Applications

 

Custom applications can be a complete user interface, or an alternate user interface that adds to the standard interface. With a complete user interface, you supply the menus, toolbars, and other items that the user will need for the focused application you have designed, plus all of the code to implement the commands. This is a good choice when you want to streamline the interface for a particular task, and don't want to confuse the users with extra items they will not need.

 

When you add an alternate user interface to the standard interface, you typically add one or more menus that give access to capabilities you have programmed, while the user can still choose the regular Maptitude commands. This is a good choice when your users need extra tools along with the familiar Maptitude commands. Here is an example that creates and adds a new menu item to the menu bar, with two simple commands on the menu:

 

Macro "Add Menu"

     // This macro adds the "Extra Menu" before the "Window" menu

     AddMenuItem("Extra Menu", "Before", "Window")

endMacro

 

Menu "My Menu System"

     // This menu item is the top-level title to be

     // added to the main menu system:

     MenuItem "Extra Menu" text: "Extra Menu" key: alt_x menu "Extra Dropdown Menu"

endMenu

 

Menu "Extra Dropdown Menu"

     // This is the body of the drop-down menu to be added

     MenuItem "hello" text: "Hello" key: alt_h do

          RunMacro("say hello")

          endItem

     Separator

     MenuItem "bye" text: "Bye" key: alt_b do

          RunMacro("say bye")

          endItem

endMenu

 

Macro "say hello"

     ShowMessage("Hello!")

endMacro

 

Macro "say bye"

     ShowMessage("Bye!")

endMacro

 

You can install and run a custom application by using a Windows program icon or by using theTools>GIS Developer's Kit>Add-Ins command. By customizing a Windows program icon, you can have Maptitude start the custom application automatically. You can even turn off the Quick Start dialog box, with the -q command line option, so that Maptitude can start executing your custom application immediately.

 

There are command line options for complete user interfaces and for adding an alternate interface to the standard interface. Each has an option for the name of the UI Database and another for the name of the startup macro. Here is the complete list of command line options:

 

Command Line Option

Description

-u

Name of complete UI Database

-i

Name of startup macro for complete UI Database; if omitted, "INTERFACE" is called as startup macro

-a

Name of alternate UI Database

-ai

Name of startup macro for alternate UI Database

-n

Name of program window

-q

Turns off the Quick Start dialog box

 

The name for each of these options can be a single word with no spaces, or be a string with quotes around it. Here are some examples:

 

Command Line

Description

"c:\Program Files\Maptitude\mapt.exe" -u myapp

Start the myapp UI Database using the default INTERFACE startup macro

c:\mapt.exe\mapt.exe -u "Find Stores" -i "Launch Program"

Start the Find Stores UI Database using Launch Program as the startup macro

c:\Maptitude\mapt.exe -q -a "Client Manager" -ai Init

Start the standard interface, don't show the Quick Start dialog box, and add the Client Manager UI Database using Init as the startup macro

 

All custom applications have a startup GISDK macro. The startup GISDK macro normally does one or more of the following:

 

What it does

How it does it

Display the program title

ShowBitmap(), ShowSnapshot()

Initialize any global or shared variables

Assignment statements

Set up the status bar

SetStatusBar()

Set up the default menu and toolbar

SetDefaults()

 

In addition, if the custom application relies on certain maps, dataviews, figures, or layouts, the startup macro normally opens or creates the necessary windows and arranges them on the screen. Once the startup macro is complete, the custom application becomes idle, waiting for the user to click on a tool or choose a command from a menu.

 

To Create a Custom Windows Program Icon

  1. Use the appropriate procedure for your version of Windows to create a new program icon or shortcut for your custom application, using a command line such as the following:

c:\Maptitude\mapt.exe -u uidbname {-i xfacmacroname}

 

or such as the following for an alternate UI Database:

 

c:\Maptitude\mapt.exe {-q} -a uidbname -ai startupmacroname

 

where the -u or -a command line option indicates the UI Database and the -i or -ai command line option indicates the startup macro. Any option can have a name without spaces, or a quoted string as a name. If the -i command line option is omitted, the startup macro must be named "INTERFACE." If the -q command line option is used, the Quick Start dialog box will not be displayed.

  1. Give the icon a descriptive name, and save it.

When you double-click the program icon, the custom application will start automatically, bypassing processing of the add-ins.txt file.

 

To Install a Custom Application as an Add-In

  1. Choose Tools>GIS Developer's Kit>Setup Add-Ins to display the Add-Ins dialog box.
  2. Click in the Interfaces list.
  3. Click Add to create a new interface listing.
  4. Type a description of the interface in the Description text box. This description will be shown when Maptitude displays a list of custom applications from which to choose.
  5. Type the name of the interface GISDK macro in the Name text box. The name must be exactly the same, including capitalization, as the name of the interface GISDK macro in the custom application.
  6. Type the name of the UI Database that contains the custom application in the UI Database text box.

    If the UI Database is in...

    Then...

    The Maptitude folder

    Just type the filename of the UI Database

    A folder within the Maptitude folder

    Add the relative pathname to the filename of the UI Database

    Another folder

    Use the full pathname and filename for the UI Database

  1. Choose an interface type:

    Type

    What it does

    Interface

    When you next start Maptitude, you will be offered a choice of running standard Maptitude or your custom interface

    Default Interface

    When you next start Maptitude, your custom interface will automatically be launched

  1. Click OK.

  2. Close Maptitude.

To run your custom interface, start Maptitude. Maptitude automatically detects that another application is also available. The user is offered a choice of which application to run (standard Maptitude or your custom application), or your custom application is automatically launched if you chose Default Interface.

 

NOTE: If you make your interface the default interface, then the only way to revert to using standard Maptitude is by editing the add-ins.txt file.

 

 

©2025 Caliper Corporation www.caliper.com