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 containing a list of topic IDs and context numbers (this will normally be supplied by your programmers).
You can assign, delete, import and export help context numbers in batch mode for your entire project.
Note that you cannot import help context numbers to anchors, even though you can export help context map files with anchor information. Also, you can only import one help context number per topic with the context tool. Multiple numbers must be added manually.
Help+Manual stores context numbers as an unsigned 4-byte integer, which means you can enter values between 1 and 4294967295. This is nearly 4.3 billion, so it should provide you with just about enough numbers for most help files if they are not too large.
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.
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 access the Topic Options tab on the left of the main editor window.
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.
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.
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
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.
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.
You can use the following three variables in your map files: