LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Using PrintCtrl() in LabWindows/CVI, how do I set the "Print to File" Attribute?

I'm using PrintCtrl() to print a table control in LabWindows/CVI. By default, the option for 'Print to File' is checked. Can I change this to NOT be checked in my code? I couldn't find the attribute listed in the function panel for SetPrintAttribute().
0 Kudos
Message 1 of 4
(3,651 Views)
That option is enabled by default if and only if you pass a non-empty string as the fileName parameter to the PrintCtrl function. If you don't want it to be checked, just pass NULL.

Luis Gomes
NI
0 Kudos
Message 2 of 4
(3,651 Views)
Hi,

I did some testing here and I think if you pass 0 or NULL to the file path input the "print to file" option is not selected. I have this behaviour here using CVI 7.0 and CVI 6.0.

Please give this a try and let me know how this goes!

Regards,

Juan Carlos
N.I.
0 Kudos
Message 3 of 4
(3,651 Views)
Juan Carlos,

You are right. My problem was that I thought I was supposed to pass the .uir file name as the file parameter in PrintCtrl(). (which was not the parameter's intended use.) But now I put NULL and it works fine. Thank you for your help.

Bill
0 Kudos
Message 4 of 4
(3,651 Views)