Creating a Map and Alias File

In order for the Help application to display the correct Help pop-up window when you select Shift+F1 on a particular object, you must associate each unique topic ID name with its corresponding Help context ID number (defined in the property page of an object). This association, or mapping, is done in the MAP section of a Help project file. The easiest way to map these values is to create a header file (.h) in a text editor and include that header in the MAP section.

Additionally, in HTML Help only, the next step is to create an alias (.h) file to map the ID number to an .htm file name. This file name is included in the ALIAS section of the Help project.

NOTE: The alias file is optional in Winhelp. It's not an integral component for the context-sensitive Winhelp, like it is for HTML Help. If you use Robohelp to create your HTML Help files, your aliases are stored in a .ali file instead of the default .h file that Microsoft Help WorkShop uses.

To create a header file with the context IDs (for both Winhelp & HTML Help):

  1. Create a new text file in a text editor, such as Notepad.
  2. In the text file, associate each topic ID name with an object's context ID number using the following format:

#define <topic ID name> <context ID number>

    For example, in the iFIX WorkSpace, if you defined the HelpContextID property of the pump in the previous example as 1000, it would appear in the header file as:

#define water_pump_onoff_btn 1000

  1. Continue to add these define statements, one per line, until all of your Context IDs have been added to the header file.
  2. Save the file as a text-only file and provide it with an .h file name extension.

To create an alias file with additional ID mapping (for HTML Help only):

  1. Create a new text file in a text editor, such as Notepad.
  2. In the text file, associate each topic ID name with an object's HTML file name using the following format:

<topic ID name>=<HTML File Name>

For example, if the HTML file name of the pump in the previous example is water_pump_onoff_btn.htm, it would appear in the alias file as:

water_pump_onoff_btn = water_pump_onoff_btn.htm

  1. Continue to add these statements, one per line, until all of your topics IDs have an associated HTML file name.
  2. Save the file as a text-only file and provide it with a .h file name extension.

 

How Do I...