Example Programs

cancel
Showing results for 
Search instead for 
Did you mean: 

Configuring a Printer Through the Windows Dialog using LabVIEW

Overview
The attached program lets you print the front panel of a VI using printer settings configured from the Windows Print Dialog.


Description
There are many times you would like to customize the way documents are printed in LabVIEW, but you have to create your own dialog for display to configure these options.  The attached program lets you print the front panel of a VI using printer settings configured from the Windows Print Dialog.

Print Front Panel.vi uses calls to the Microsoft .NET framework to display the Print Dialog window and retrieve settings made in the dialog to configure how the front panel of a VI is printed.  VIs from the Report Generation palette are used to capture the front panel and set the report for the desired orientation, margin size, printer used and number of copies, however you do not need the Report Generation Toolkit installed to use this example.

 

 Requirements

LabVIEW 2012 (or compatible)


Steps to Implement or Execute Code

  1. Run the application as subvi.

 

Additional Information or References
VI Snippet

Print Front Panel.pngGetPrinterSettings.png

 **This document has been updated to meet the current required format for the NI Code Exchange.**

Donovan
Comments
Active Participant Snamprogetti
Active Participant

"Find Window.vi" does not work for me (LV 2009 on Win XP sp3), unless i specify a custom Window title in VI Properties. When window title is default, it is something like "filename.vi Front Panel rev. X" but it searches for "filename.vi" so i get a "No Window found with the specified name" error.

If i set a custom Window title it goes on, but... printed page is blank!