LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

how to call windows print dialog?

Hello,

 

is it possible to call the standard windows print dialog  with LabVIEW?  Actually labview has all functions about selecting printers, page settings and so on. But it will be much easier, if the standard windows print dialog could be called directly. 

 

Thanks a lot!

 

Le

0 Kudos
Message 1 of 10
(6,669 Views)

You can call it using the ActiveX functions, I think...

 

Just try it out & post back here.

- Partha ( CLD until Oct 2027 🙂 )
Message 2 of 10
(6,667 Views)

Sorry, not ActiveX, but using .Net functions.

 

 There was some post a little while earlier regarding how to call the Font Dialog as modal on top of the VI. If you can search for it, then all you have to do is just to select the PrintDialog option for the .Net Class Constructor Node.

 

You can either invoke it as a modal or non-modal dialog using those set of VIs, that have the Windows DLLs present inside the wrapper SubVIs.

 

I ll try to post them, if I have...

- Partha ( CLD until Oct 2027 🙂 )
Message 3 of 10
(6,655 Views)
See here & here for more info reg the Font dialog & Print dialog respectively. Smiley Happy
- Partha ( CLD until Oct 2027 🙂 )
Message 4 of 10
(6,654 Views)

Has this progressed any further? I would love a VI that pops up the standard Windows Print Dialog box and then returns the selected printer name as an output string.

 

Can't locate such a beast anywhere! Surprised this isn't part of the LabView VI library somewhere.

 

Thanks.

0 Kudos
Message 5 of 10
(6,247 Views)
I used to use this VI
LV 2011, Win7
0 Kudos
Message 6 of 10
(6,230 Views)

Sorry I should have made my question clearer!

 

Yes I agree the above VI is a great way to print a VI panel to the printer and the VI does have a "Show Printer Dialog" input. However, I can't seem to find a routine that returns selected print options (including printer choice) if you want to print a text file for example.

 

I find it weird that in one VI it has the "Show Printer Dialog" input, but in others there is nothing. eg "Print Report" VI.

0 Kudos
Message 7 of 10
(6,203 Views)

I use this VI to show a PrintDialog in LabVIEW. The VI is a bit weird since it was in fact a combination of the functionality of Default Printer Property before this property was present and the printer dialog. To get a VI which would work like a printer dialog you would have to do something like this:

 

Print Dialog.PNG

 

Unfortunately there seems no way to retrieve the landscape/portrait and similar other settings.

 

This has prompted me in the past to create my own print dialog that simply has a drop down selection box for the printer.

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 10
(6,180 Views)

Thanks, this is a nice VI except you didn't wire out the CANCEL state and your VI is password protected so I can't do it either.

Would mind terribly to either repost with the cancel state wired out, OR remove the password?

Thanks.

 

RM

0 Kudos
Message 9 of 10
(5,179 Views)

The VI you refer to is from NI. I can't unprotect it. And the called functionality in there is exactly like what the VI exposes. No Cancel state indication is possible. Sorry!

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 10 of 10
(5,171 Views)