LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

print *.txt

Hi all experts,

Can I use LabVIEW to print a txt file in my hard drive? If the answer is yes, hope someone can show an example to me.

thanks!

best regard
Jaxx
using labVIEW 7.1 on winXP

Message Edited by @ on 04-17-2005 10:47 PM

0 Kudos
Message 1 of 18
(5,806 Views)
Hi Jaxx

Try the Report Generation vi's in the Report Generation palette.

To print a txt file create a vi with the following steps.

1) Create a New Report, make report type Standard.

2) Append File to Report, the file to append is your txt file.

3) Print Report

4) Dispose Report

Another way would to call the PRINT "filename" command using system exec.vi, I haven’t tried this but may be worth a try.

I hope this helps
Kurt Friday
www.sciware.com.au
0 Kudos
Message 2 of 18
(5,792 Views)
Hi, Kurt really thanks for your reply...

but may I know how to create a new report?

with regard
Jaxx
0 Kudos
Message 3 of 18
(5,788 Views)
If you want to print the file out on the printer I would check out the Report Express VI.

Regards
Nicholas

Message Edited by Nick on 04-18-2005 07:51 PM

0 Kudos
Message 4 of 18
(5,789 Views)
No, the report express vi not allow me to change the file path... anyway, thanks for suggest... 🙂

with reagrd
Jaxx
0 Kudos
Message 5 of 18
(5,784 Views)
I had tried your suggestion but there got a error(-41003), any idea about this?
0 Kudos
Message 6 of 18
(5,783 Views)
Hi Jaxx

I've appended the code, hope this helps.
Kurt Friday
www.sciware.com.au
0 Kudos
Message 7 of 18
(5,776 Views)
Hi, Kurt...

I had tried your VI but it still pop out the same error(-41003)... my text file is not only one page. Is it got relation about that?

with regard
Jaxx
0 Kudos
Message 8 of 18
(5,773 Views)
Hmmmm, interesting

I was testing the code by just printing to a PDF writer, which is just listed as a printer and it worked fine. I just printed to a physical printer and I get the warning -41003 which suggests an open file error. I just tinkered with the vi and if you set the type to HTML instead of standard it works. I've made the change to the code and re-attached it.
Kurt Friday
www.sciware.com.au
0 Kudos
Message 9 of 18
(5,774 Views)
I had tried your code, but is it I really need to print the file as HTML? What is the different if i change the report type from standard report to HTML?

with regard
Jaxx
0 Kudos
Message 10 of 18
(5,766 Views)