NI Home > Community > NI Discussion Forums

LabVIEW

Reply
Member
Kinnary
Posts: 16
0 Kudos

Can i get windows print dialog box in LabView? How?

 
Active Participant
chrisger
Posts: 1,033
0 Kudos

Re: Can i get windows print dialog box in LabView? How?

hi

yes, you can (see attachment)

well, i'm sure tehre are several methods to show the dialog, e.g. WinAPI DLL-calls etc.

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Member
Kinnary
Posts: 16
0 Kudos

Re: Can i get windows print dialog box in LabView? How?

Hi,
i tried doing your way, but it says "error -2147221230 occured at unknown system error in showprinter.vi"
on analysing i saw that, the refnum passes '0' as output to property as well as invoke node. suggest me the appropriate, either another way of doing it or rectifying(if needed) in the present solution.
Regards,
Kinnary
Active Participant
chrisger
Posts: 1,033

Re: Can i get windows print dialog box in LabView? How?

hi,

well, there's a

PrintDlg in Comdlg32.dll, but that function needs a bad structure as input.

Visit

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/userinput/commondialogboxlibrary/commondialogboxreference/commondialogboxfunctions/printdlg.asp

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Member
Kinnary
Posts: 16
0 Kudos

Re: Can i get windows print dialog box in LabView? How?

Hi chris,
Got the dialog box by first mathod itself. now what shall i do next. mean how do i print a vi using the dialog box. what input shall i give to "printer name" in print report.vi (report generation toolkit). at present it uses default printer.
regards,
kinnary
Active Participant
chrisger
Posts: 1,033

Re: Can i get windows print dialog box in LabView? How?

hi

see attachment (as always, there are several solutions...)

best regards
chris
Best regards
chris

CL(A)Dly bending G-Force with LabVIEW

famous last words: "oh my god, it is full of stars!"
Member
Kinnary
Posts: 16
0 Kudos

Re: Can i get windows print dialog box in LabView? How?

Hi Chris,
Both the solutions, show printer dialog box and printing of the vi, both are working fine individually. how do i co-ordinate both of them. mean i want the user to select the printer name from printers' dialog box. please suggest the soon.
Regards,
Kinnary
Member
Scott Y
Posts: 192
0 Kudos

Re: Can I get windows print dialog box in LabView? How?

Kinnary,

The example program titled Print Panel to Selectable Printer will allow you to first select a printer, and then print the front panel of the current VI. This example is designed to be used as a SubVI.

Scott Y.
NI
Member
Trey1234
Posts: 1
0 Kudos

Re: Can I get windows print dialog box in LabView? How?

Please post the "Print Panel to Selectable Printer.vi".  The above link is broken. I need a vi like this.

 

Thanks.