LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

CVI 7.0 PrintPanel() Speed/Size

I recently upgraded to CVI 7.0 (from 5.0.1) at work. I opened up one of the projects I'd been working on in the older version of LabWindows, and started chugging away.

I put in a call to PrintPanel() to get a hardcopy of the panel - nothing fancy - an XY plot with around 200 points at most, 8-10 text fields, a start and stop button, and a list box.

Anyway, when I compiled/ran the program, and it hit the print call, it took almost 30 seconds to finish the print spool/output. I kept an eye on the print manager the next time I ran it, and saw the file size spooling to the printer hit 59 MB!

The size of the print job doesn't concern me as much as the time it takes to execute the print job does. Using CVI 5.0.1 previously, the call to Pr
intPanel() was over and done with at the click of an 'OK' button. I have a feeling I'm missing a setting or preference, but I can't see what else there is to fiddle with.

Printing as a bitmap was much quicker, but I really didn't like the jagginess/blockiness of the end product.

Any ideas on a better/faster/smaller method, or a parameter to change to get PrintPanel a little zippier?

Thanks

Thomas McManus
0 Kudos
Message 1 of 7
(3,585 Views)
Hello Thomas,

It is strange that the PrintPanel function takes so long and so much space. I've been doing some tests here and the file that goes to the printer should be much smaller (most likely below 1 MB).

The first thig to try here would be to print another project to see if the problem persists. Also (if possible) print your project to another printer to see if this is specific to that driver.

What OS are you using? Have you tested this behavior in another OS?

I hope this gives you some ideas, please keep me posted.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 7
(3,585 Views)
There is a setting that changes in CVI 6.0 on printing because of the new 3D style controls in CVI. The 3D style controls cannot be rendered in GDI printing, so you have to print in "bitmap mode" which makes a bitmap of the screen and sends the image to the printer. I believe the default behavior of the Print functions with graphics changed to "bitmap" mode when we released CVI 6.0 so that the 3D controls would defaultly print correctly.

Try experimenting with the bitmap mode of printing with SetPrintAttribute. Try printing in both modes, bitmap and non-bitmap and see if one behaves like the previous version of CVI.

Best Regards,

Chris Matthews
National Instruments
0 Kudos
Message 3 of 7
(3,585 Views)
Juan -

Thanks for your response...

To answer some of your questions in no particular order -

We're running Win 2K Professional, and I don't really have access to another platform to fiddle with, unfortunately.

I've tried outputting to 2 different printers, with the same results. One is an HP 8000 series, the other an HP 2100 series.

Again, and as another NI rep responded after your response, the bitmap mode of printing _is_ significantly faster, but as I mentioned in my original comment, the output really doesn't look very good, especially compared to the output of the same code/program compiled under the older version of LabWindows.

Finally, I will be working on a couple of other projects, but right now I've only got the test equipment
for this particular test available.

Thanks again for your help

Thomas McManus
mcmanust@tycoelectronics.com
0 Kudos
Message 4 of 7
(3,585 Views)
Hi, Chris -

With regards to that, then, are _all_ the controls in a .uir now 3D, or are there certain ones in 2D/3D I can try and pick and choose from?

As I mentioned in my original post, I have used the bitmap mode of printing, but the quality of the output, compared to the output from the same code/program compiled under the older version of LabWindows, is pretty ugly. Very blocky/chunky.

I've tried to go back and recompile/execute under my old version of LabWindows (5.0.1), but it chokes on the uir file, telling me that it's been created under a newer version of LabWindows, and doesn't recognize some of the controls. Is there a backwards compatibility mode/conversion tool so I can go back and forth betwixt the two?

Thanks again for your he
lp

Thomas McManus
mcmanust@tycoelectronics.com
0 Kudos
Message 5 of 7
(3,585 Views)
Sorry to reply to myself, but I just got the panel print back to where I wanted it -

After I had started working in 7.0, I added 3 controls to the panel - 2 text messages and a string box. I just went through the panel, deleted them, and replaced them with controls from the "Classic Controls" section of the "Create" dropdown.

With the replacement of the new (Apparently 3D and enormous) controls, the print job dropped to < 1 MB, and the print job finished up nice and quick.

I'm almost curious whether it was one of the specific types of controls that made things go goofy (the string box, maybe), but it ain't broke now, and I'm not gonna re-fix it.

Thanks to Juan and Chris for their assistance

Regards

Thomas McManus
mcmanust@ty
coelectronics.com
0 Kudos
Message 6 of 7
(3,585 Views)
Yes, the new 3D style controls require 3D rendering so when you aren't in bitmap mode, it takes a lot more data to draw these to the printer.

Chris
0 Kudos
Message 7 of 7
(3,585 Views)