Print or save VIs and VI documentation to keep a record you can refer to later. You can use the following primary ways to print VIs:
You can configure how LabVIEW prints a VI when you select File»Print Window or when you print programmatically by selecting File»VI Properties.
You can print the contents of the active front panel or block diagram window by selecting File»Print Window. LabVIEW prints the workspace of the active window, including any objects not in the visible portion of the window. LabVIEW does not print the title bar, menu bar, toolbar, or scroll bars.
You can print VI documentation or save it to HTML, RTF, or text files by selecting File»Print. You can select whether to print documentation for a single VI or for multiple VIs. You also can select a built-in documentation style or create a custom style for documentation.
The documentation you create can include the following items:
|Note The documentation you create for certain types of VIs cannot include all the previous items. For example, a polymorphic VI does not have a front panel or a block diagram, so you cannot include those items in the documentation you create for a polymorphic VI.|
You can save VI documentation to HTML, RTF, or text files. You can import HTML and RTF files into most word processing applications, and you can use HTML and RTF files to create compiled help files. You also can use the HTML files LabVIEW generates to display VI documentation on the Web. You also can print and save documentation to HTML, RTF, and text files programmatically.
When you save documentation to an RTF file, specify if you want to create a file suitable for help files or for word processing. In the help file format, LabVIEW saves the graphics to external bitmap files. In the word processing file format, LabVIEW embeds the graphics in the document. For HTML files, LabVIEW saves all graphics externally in the JPEG, PNG, or GIF formats.
When you save documentation to an HTML file, you can select the format of the graphics files and the color depth.
The JPEG format compresses graphics well but can lose some graphic detail. This format works best for photos. For line art, front panels, and block diagrams, JPEG compression can result in fuzzy graphics and uneven colors. JPEG graphics are always 24-bit graphics. If you select a lower color depth such as black-and-white, graphics save with the depth you requested, but the result is still a 24-bit graphic.
The PNG format also compresses graphics well, although not always as well as the JPEG format. However, PNG compression does not lose any detail. Also, it supports 1-bit, 4-bit, 8-bit, and 24-bit graphics. For lower bit depth, the resulting graphic compresses much better than JPEG.
LabVIEW does not save graphics as compressed GIF files. Use a graphics format converter to convert the uncompressed GIF files that LabVIEW saves to compressed GIF files. For higher quality compressed GIF files, select the PNG format when you save the documentation and use a graphics format converter to convert the PNG files that LabVIEW saves to GIF files. Starting with the PNG format produces higher quality graphics because the PNG format is an exact reproduction of the original graphic. Modify the HTML file that LabVIEW generated to refer to the GIF files with the .gif extension.
When you generate HTML or RTF documentation with external graphics, LabVIEW saves the control and indicator data type terminals to graphic files with consistent names. If a VI has multiple terminals of the same type, LabVIEW creates only one graphic file for that type. For example, if a VI has three 32-bit signed integer inputs, LabVIEW creates a single ci32. x file, where x is the extension corresponding to the graphic format.
You can use the HTML or RTF files LabVIEW generates to create your own compiled help files. (Windows) You can compile the individual HTML files LabVIEW generates into an HTML Help file. (Mac OS X) You can use the individual HTML files LabVIEW generates in Apple Help.
You can compile the RTF files LabVIEW generates into a (Windows) WinHelp or (Linux) HyperHelp file.
After creating and compiling the help files, add them to the Help menu of LabVIEW or to the custom application by placing them in the labview\help directory.
Create links from VIs to HTML files or compiled help files by selecting File»VI Properties and selecting Documentation from the Category pull-down menu.
Use any of the following ways to programmatically print VIs or data the VIs return:
|Note If you print VI documentation from a stand-alone application, you can print only the front panels.|
Select Operate»Print at Completion to print the front panel of a VI when it finishes running. You also can select File»VI Properties, select Print Options from the Category pull-down menu, and place a checkmark in the Automatically Print Panel Every Time VI Completes Execution checkbox.
Selecting these options is similar to selecting File»Print Window when the front panel is the active window.
If you use the VI as a subVI, LabVIEW prints when that subVI finishes running and before the subVI returns to the caller.
In some cases, you might not want a VI to print every time it finishes running. You might want printing to occur only if the user clicks a button or if some condition occurs, such as a test failure. You also might want more control over the format for the printout, or you might want to print only a subset of the controls. In these cases, you can use a subVI that is set to print at completion.
Create a subVI and format the front panel the way you want LabVIEW to print it. Instead of selecting Operate»Print at Completion in the higher level VI, select it in the subVI. When you want to print, call the subVI and wire the data you want to print to the subVI.
Use the Report Generation VIs to print reports or to save HTML reports that contain VI documentation or data the VI returns. Use the Easy Print VI Panel or Documentation VI to generate a basic report that contains VI documentation. Use the Easy Text Report VI to generate a basic report that contains data the VI returns. Use the other Report Generation VIs to generate more complex reports.
Use the Report Express VI to generate a preformatted report that contains VI documentation, data the VI returns, and report properties, such as the author, company, and number of pages.
Use the Report Generation VIs to perform the following tasks:
If standard LabVIEW printing methods do not meet your needs, you can use the following additional techniques: