LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if a printer is color?

Hi All,

I'm working on some print functions for my LV 8.20 app.  In one instance I am printing the visible front panel.  When I send to the color printer it works spiff.  It generates an error when I send to a B&W printer.  I use the "Query Available Printers" VI to see which are available and have a VI that allows the user to select.  I then have a global variable which is that big 'printer options' cluster where I can set the destination printer.  However, I do not know how to detect if the printer is color or B&W and set the "color or monochrome" member of that cluster.  I think that is why I am getting the error on the "Easy Print VI Panel..." vi, when I send a color image to a B&W printer. 

Anywho, any help appreciated.
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 1 of 3
(2,750 Views)
Just a little more investigation on this...

The "Set LabVIEW Printing Settings.vi" is where error 31 first appears in the second case.  The passed in printer name is compared to the default and if not equal, tries to set the default to the one passed in.  For whatever reason, it is not allowing the Pr.DefaultPrinter to be changed to the new printer.
Greg Cole
“It is not the ship so much as the skillful sailing that ensures the prosperous voyage.”
0 Kudos
Message 2 of 3
(2,750 Views)
Hi GReaper,

I found a good discussion forum post with some sample code that will allow you to change the default printer. It may be found at the link below:

http://forums.ni.com/ni/board/message?board.id=170&message.id=133336&requireLogin=False

I hope this helps. Have a great day!

Best regards,

Steven
0 Kudos
Message 3 of 3
(2,722 Views)