![]() | Adding Boilerplate Pages |
A common help template customization is adding help pages to the driver help file. Because these specialized pages often discuss general topics, they are often reused across multiple driver projects. Hence, they are referred to as boilerplate help pages. Nimbus uses this terminology even if the help pages are only used in a single driver help project. The section below on replacement tags explains a special feature that is useful in authoring boilerplate content that will be shared amongst multiple drivers. The procedure for integrating boilerplate help pages is identical for shared pages and driver-specific pages.
![]() |
---|
The procedure below uses the file names for IVI.NET driver help projects. The procedure and file names for IVI-COM and IVI-C driver help projects are similar. |
From Solution Explorer, navigate to the Template\Html\Boilerplate folder of the driver help project (<projectName>Help).
To add an existing HTML file right click on the Boilerplate node, and choose Add Existing Item... and navigate to the desired file.
To add a new HTML file right click on the Boilerplate node, and choose Add New Item... and choose HTML Page from the New Item Dialog.
To ensure the style of the new page is consistent with other pages in the help template, it is generally easier to copy the content of another help page in the template and use it as a starting point for the new page.
Add a <HelpTOCNode> to the help template manifest file (Manifest.xml) that points to the new page. Note that the Resource attribute just lists the file name.
If the added page references a script file (.js) or a graphics file (such as a .jpg or a .bmp), perform the following steps:
Add the file to either the Graphics, Icons, or Scripts subfolder of the help project's Template folder.
In the Manifest.xml file, add an entry under the <AdditionalFiles> element, as in the example below:
<!-- Manifest.xml--> <AdditionalFiles> <Binary OutputDir="Graphics" Resource="MyDiagram.jpg"/>
If help pages are to be reused between different drivers, it is important to not hard-code into the pages any references to a specific driver, such as the project name or the driver output file name. Instead, special replacement tags can be used in the HTML itself and Nimbus will automatically replace the tags with the appropriate values for the driver when the help project is built.
The example HTML below uses the $$DRIVER_NAME$$ replacement tag in some introductory text. This would be replaced with a name such as Acme4321 when the help project is built.
<!-- MyFile.html --> <div class="introduction"> <p> Because the $$DRIVER_NAME$$ driver is a standard .NET assembly, it may be accessed from COM-aware native applications written in languages such C++ and Visual Basic. </p> </div>
Nimbus supplies a number of replacement tags that can be used when authoring help pages. The complete list of supported replacement tags for each type of IVI driver is given in the table below:
Replacement Tag | Driver Type | Description |
---|---|---|
$$INSTR_PREFIX$$ | IVI-COM, IVI-C | IVI-C prefix. Example: Acme |
$$INSTR_PREFIX_UPPER$$ | IVI-COM, IVI-C | IVI-C prefix in all uppercase. Example: ACME |
$$INSTR_PREFIX_LOWER$$ | IVI-COM, IVI-C | IVI-C prefix in all lowercase. Example: acme |
$$PIA_FILENAME_NO_EXT$$ | IVI-COM, IVI-C | Name of the primary interop assembly file without the extension. Example: Acme.Acme4321.Interop |
$$DRIVER_DLL_FILENAME_NO_EXT$$ | IVI-COM, IVI-C | Driver DLL filename without the extension. Example: Acme4321 |
$$SUPPORTED_MODELS$$ | All | Comma-separated list of supported instrument models. |
$$IVI_CLASS_NAME$$ | All | Name of supported instrument class. Example: IviScope |
$$IVI_CLASS_NAME_UPPER$$ | All | Name of supported instrument class in all uppercase. Example: IVISCOPE |
$$IVI_CLASS_NAME_LOWER$$ | All | Name of supported instrument class in all lowercase. Example: iviscope |
$$COMPANY$$ | All | Name of the driver vendor as listed in the Driver Settings Editor. |
$$DRIVER_NAME$$ | All | Name of the driver. Example: Acme4321 |
$$DRIVER_NAMESPACE$$ | IVI.NET, IVI-COM | For IVI.NET, .NET namespace for the driver assembly. Example: Acme.Acme4321 For IVI-COM, .NET namespace for the driver's primary interop assembly. Example: Acme.Acme4321.Interop |
$$DRIVER_DESCRIPTION$$ | All | Description text taken from the Driver Settings Editor. |
$$VERSION_TWO_DIGIT$$ | All | Two-digit version number. Example: 5.1 |
$$VERSION_THREE_DIGIT$$ | All | Three-digit version number. Example: 5.1.2 |
$$VERSION_FOUR_DIGIT$$ | All | Four-digit version number. Example: 5.1.2.3 |
$$VERSION_MAJOR$$ | All | Major version number. |
$$VERSION_MINOR$$ | All | Minor version number. |