LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Print VI at completion, with a print dialog box??

I'm trying to print a VI at completion, and want the user to be able to choose which printer they want to print to. Is there a way I can open the print dialog box from Labview??? (I'm relatively inexperienced with the program) Thank you!
0 Kudos
Message 1 of 3
(3,087 Views)
Liz,

Try this example out. It uses the Microsoft Print Dialog Box common control via ActiveX. I based it off of another example form our web site that I found by searching for "+labview +print +dialog +example".

Randy Hoskin
Applications Engineer
National Instruments
http://www.ni.com/ask
0 Kudos
Message 2 of 3
(3,087 Views)
Not that I know of directly from LabVIEW. You could write a C code
wrapper DLL that calls COMMDLG.DLL (the windows common dialog API
calls) to give you the print dialog, or could write write an MFC DLL
that uses a CPrintDialog.

If you use MFC, then you will be writing C++ and will have to make
sure to watch out for "decorated" names by by using the extern "C"{ }
declaration around your function and explicitly declaring your
function in your .def file

Douglas De Clue
LabVIEW developer
ddeclue@bellsouth.net

"Liz F." wrote in message news:<50650000000800000006540000-1027480788000@exchange.ni.com>...
> I'm trying to print a VI at completion, and want the user to be able
> to choose which printer they want to print to. Is there a way I can
> open
the print dialog box from Labview??? (I'm relatively
> inexperienced with the program) Thank you!
0 Kudos
Message 3 of 3
(3,087 Views)