Navigation:  Tools included with Help & Manual >

The Help Context Tool

Print this Topic Previous pageReturn to chapter overviewNext page
Show/Hide Hidden Text

The Help Context Tool helps to manage the help context numbers in your project and it can also be used to generate  topic files automatically from map files supplied by your programmers.

You can assign, delete, import and export help context numbers in batch mode for your entire project. In addition to this you can also use the tool to automatically generate missing help topics from a map file containing a list of topic IDs and context numbers.

Supported context number range:

Help & Manual stores context numbers as an unsigned 4-byte integer, which means you can enter values between 0 and 4294967295. This is nearly 4.3 billion, so it should provide you with just about enough numbers for most normal applications.

       Key Information

Note that you cannot import help context numbers to anchors, even though you can export help context map files with anchor information. Note also that you can only import one help context number per topic with the context tool. Multiple numbers must be added manually.

Assigning context numbers to all topics without them

This function only assigns context numbers to topics that do not yet have them, existing context numbers are protected. If you want to renumber all the topics in your project first use the Delete function (see below) to clear all the numbers in your entire project.

1.Select your project in the Project Explorer, then select Context Tool in Project > Tools.
2.Click on Create Numbers. A dialog will be displayed informing you of the starting number an the increments that will be used between numbers.
3.Click on Create Numbers to assign the numbers. Numbers will be added to all topics in your project that do not yet have context numbers.

Changing the increment:

This function uses the increment set in your project configuration for assigning context numbers to new topics. You can change the setting in the Project Explorer in Configuration > Common Properties > Miscellaneous.

Editing and adding context numbers for single topics
1.Select your project and open the Context Tool (see above).
2.Select List all Topics to make sure that all topics are listed, including those that do not have context numbers yet.
3.Select a topic from the list, click on the topic you want to edit and select Edit Number.
4.You can then add a new context number or edit the existing number.

You can't add multiple context numbers with this method. To add multiple numbers to a topic you must use the tab behind the main editor.

Adding new numbers and topics:

The Add New Number function is for creating new topics with new numbers. Enter a new topic ID followed by a new number. The new topic ID and context number will be added to the list and a new topic file will be created when you click on OK.

An error will be displayed if you enter the ID of an existing topic.

Deleting help context numbers
1.Open your project and select Tools > Help Context Tool.
2.Select the context numbers you want to delete in the list displayed. Use Ctrl+Click and Shift+Click to select multiple numbers.
3.Click on Delete Selected to delete the context numbers from the selected topics.

Note that if selected topics have multiple context numbers all the numbers will be deleted, even though only  the first number is shown for the topic in the list.

Importing context numbers and auto-generating topics from a map file

Software development tools can generate "map" files with lists of context IDs and matching help context numbers. Programmers often provide these lists to inform the help authors of the topic IDs and context numbers needed for context-sensitive help calls.

In addition to importing missing context numbers to existing topics this function can also auto-generate missing topics from a map file. Since context-sensitive help often consists of hundreds of very short topics this capability can save you many hours of boring and frustrating work. It creates the basic framework for your context help in seconds.

Importing context numbers:

1.Obtain the map file from the programmers and make sure that it only contains the topics you want to use. These files have a standard syntax – you can create an example by using the Help Context Tool's export function (see below).
2.Open your project (you might want to make a backup first) and select Tools > Help Context Tool.
3.Select Import Map File and select the map file you want to import. A dialog will be displayed asking you whether you want to merge or replace the existing numbers

Replace:
This deletes ALL context numbers in the current project and replaces them with the numbers from the map file.

Merge:
This only replaces the context numbers for topics with matching IDs. All other topics are left unchanged.

Auto-generating topics:

When you import a map file any topic IDs in the file that don't exist in your project will be listed in red in the Context Tool editing box. When you click on OK the tool will ask you if you want to create topic files for these IDs.

If you say yes the files will be created in the Topic Files section, without TOC entries. If you want to create TOC entries for the new topics you must do this manually.

Exporting IDs and context numbers to a map file

You can also use the Help Context Tool to export the topic IDs and help context numbers from your project to a map file that the application programmers can use for writing their context help calls (and also to obtain an example of the map file syntax).

1.Open your project (you might want to make a backup first) and select the Context Tool in the Tools > Help Context Tool section.
2.If you only want to export some of the help context numbers select them in the list with Ctrl+Click and Shift+Click. Then select Export Map File:

3.Select Export selected numbers only if you don't want to export the entire list, then choose the Map File Syntax:
#Define is the default and selects the standard #define syntax used in most map files.
INI Style selects the standard INI file format.
Custom allows you to define your syntax yourself. To do this you can combine the three map file variables displayed (see below) with any text or additional characters of your own.
4.Enter a filename and click on Save to export the map file.
Variable syntax for custom map file output

You can use the following three variables in your map files:

<%TOPICID%>

Inserts the Topic ID of the current topic. Unlike <%HREF_CURRENT_PAGE%> this variable inserts the Topic ID exactly as it is displayed in the tab, including upper and lower case characters.

<%ANCHORID%>

Inserts the anchor ID of an anchor that has a help context number.

<%TOPIC_HELPCONTEXT%>

Inserts the help context number of the current topic or anchor.

Just inserting the variable on its own generates a decimal number. You can also export the context numbers in hexadecimal by adding a hex prefix:

&<%TOPIC_HELPCONTEXT%>

Exports to hex in the format &000000FF

0x<%TOPIC_HELPCONTEXT%>

Exports to hex in the format 0x000000FF

See also:

Topic IDs and context numbers

IDs, Context Numbers and Keywords

 


Page url: http://www.helpandmanual.com/help/index.html?hm_advanced_tools_context.htm