Generate HTML Web Documentation From LabWindows/CVI Function Panels


LabWindows/CVI gives you the ability to quickly distribute documentation at project completion. LabWindows/CVI is commonly used to develop instrument drivers, which are stored as function panels. Starting with LabWindows/CVI 8.1, you can now generate function panel documentation in HTML format, in addition to plain text or Windows Help format. This articlel focuses on describing the generation of HTML help for instruments and function panels.


Getting Started

With the function panel HTML generation capabilities of LabWindows/CVI, you can take the documentation already included in your instrument drivers or function panels and generate Web-ready documentation that can be easily distributed and searched.

Throughout this whitepaper, we will use the attached FP file and SUB file as an example. Save these files to disk and open the FP file in LabWindows/CVI.

From the instrument function tree, we will use the LabWindows/CVI's function documentation generator to create HTML documentation for the instrument. After selecting menu Options » Generate Documentation » HTML... and choosing the programming language for which you want to generate the documentation, the HTML files are generated and saved in the same directory as the instrument. 

Figure 1. Generating HTML Documentation

Generated HTML Documentation

The LabWindows/CVI HTML generation tool outputs a top-level HTML page that displays the high-level documentation for the function panel, including separate pages documenting each included function. In addition, each HTML page includes quick navigation links allowing you to navigate alphabetically or through the function hierarchy for specific function documentation and example code.

Specifically, the HTML documentation is generated based on the hierarchy of the function panel tree and the help text associated with each class in the function tree.

LabWindows/CVI creates one main overview HTML file in the directory of the function panel (.fp file), including a separate subdirectory which contains additional HTML files: one HTML file for each function tree class, one HTML file for each function panel, one HTML file with an alphabetical function list and one HTML file with a hierarchical function list.

The main HTML overview file contains generic information such as introduction, software assumptions, error and status information, and links to the alphabetical index, hierarchical index and the main function panel overview file.

Figure 2. Generated HTML Help Documentation Overview Page

Function Panel Overview Help

The main function panel help file contains overview documentation for the function panel and lists all the classes and functions in the root of the function tree. All classes and functions are hyperlinked to their respective HTML files.

This file also includes a link to the alphabetical function index and the hierarchical function index.

Figure 3. Alphabetical Function Index and Hierarchical Function Index

The alphabetical and hierarchical index pages show all functions in the function tree in the appropriate order. All classes and functions are hyperlinked to the respective HTML files.

Figure 4. Alphabetical Function Index

Figure 5. Hierarchical Function Index

Class Help

For each class, a separate HTML page is generated detailing the list of functions and subclasses declared in the class, along with hyperlinks to the alphabetical index, hierarchical index and the main function panel overview file.

Figure 6. Class Documentation

Function Help

For each function help page, a separate HTML page is generated detailing the syntax of the function, a description of the function's purpose, all input parameters and all output parameters, with their help description, and the return value description if applicable.

The function panel help page also contains hyperlinks to the alphabetical index, hierarchical index and the main function panel overview file.

Figure 7. Detailed Function Documentation

Attribute Help

Finally, if a function contains an attribute parameter and the instrument has a .SUB file associated with it, the HTML help also contains a page listing function attributes.

Figure 8. Attribute Documentation  

Additional Resources

The proven LabWindows/CVI development environment can make your ANSI C application development more productive with various documentation tools, including source code tags, the ability to generate function panels from headers files, and the ability to generate HTML documentation from function panels. 


Was this information helpful?