LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

if I use "LaunchExecutableEx("print PmaxPRN_FILE",LE_HIDE,&handle)" in windows 2000, it does not print.

I cannot get it to print the file using windows print command.

Thank you very much for helping.
0 Kudos
Message 1 of 4
(2,953 Views)
Nyan,

What exactly is PmaxPRN_FILE? if this is a string tht contains tha filename you would nwwd to first built it with the print command and pass this to the functions; something like this:

char cmdString[100];
sprintf(cmdString, "print %s", PmaxPRN_FILE);
LaunchExecutableEx(cmdString,LE_HDE,&handle);


If PmaxPRN_FILE is tha actuall filename make sure that it is located in the same folder as the application or make sure you provide the full path to it.

I hope this helps.

Regards,

Juan Carlos
N.I.
0 Kudos
Message 2 of 4
(2,953 Views)
Hi Juan,

PmaxPRN_FILE "c:\\PMAXprintout.dat"

I tried that "print PmaxPRN_FILE", but it does not work in my windows 2000. I tried using just function panel just to see if the file is printed. It displays the dos command window and said "c:\\PMAXprintout.dat is currently being printed" but it does not print.

Basically, "print" will call the windows PRINT.EXE command, right? Do you need special command to launch?


Thank you very much for your help.
Yan
0 Kudos
Message 3 of 4
(2,953 Views)
Yan,

I've been doing a couple of tests here and I can't get the print function to work from the windows command prompt. I see the same message that you see when calling it from CVI. I'm running XP and all my printers are over a network. Since this is a old function (introduced in DOS 2.0) it may be possible that it only works with parallel port printers and it is even possible that it is not supported on Windows 2000 or any Windows version that has hardware protection.

The bottom line is if you can get it to work under the command prompt then we should be able to get it to work calling it from CVI.

As an alternative you can use the CVI report generation tool to print the file. It's fairly simple to generate a text report and print it out, and this
should work on any Windows OS.

Let me know if you have any questions on this.

Juan Carlos
N.I.
0 Kudos
Message 4 of 4
(2,953 Views)