LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

print dialog in LV 8.0.1

Does anybody know how to call print dialog in LV 8.0.1. I used this in LV 7.1. but in new version it doesn't work properly. I realy need print dialog and realy don't know how.

Can anybody help me?

Message Edited by jochynator on 07-24-2006 04:25 PM

Message Edited by jochynator on 07-24-2006 04:26 PM

jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 1 of 9
(3,718 Views)
It brought up the dialog for me.  I have LabVIEW 8.0.1 Developer's suite on a Windows XP Pro system. 

Maybe you could explain what you are seeing that is different than what you saw before.

Bob Young

0 Kudos
Message 2 of 9
(3,710 Views)
This behaviour is really strange. When I open only simple test example it works but when I create empty LV project, error occurs. Just try.
1) run test.vi (nothing other in memory) - it works
2) close test.vi then open empty project (not necessary ad test.vi to them)
3) open test.vi again - test.vi and new project in memory
4) run test.vi
5) error occurs
jochynator
LV 8.0.1, WinXP Pro
Download All
0 Kudos
Message 3 of 9
(3,707 Views)
I found someone who had same problem but there is not solution. The last advice from this thread doesn't work.
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 4 of 9
(3,702 Views)


@jochynator wrote:
This behaviour is really strange. When I open only simple test example it works but when I create empty LV project, error occurs. Just try.
1) run test.vi (nothing other in memory) - it works
2) close test.vi then open empty project (not necessary ad test.vi to them)
3) open test.vi again - test.vi and new project in memory
4) run test.vi
5) error occurs

As said in that other thread, this is the lvlib thing or actually not really but rather the multiple context addition in LabVIEW 8. If you simply run test.vi in LabVIEW you run it in the main context and that is the same as was used to run any and all VIs in previous versions of LabVIEW. If however you create a project the vi runs in the context of that project environment. The function used will still search the internal list of open VIs that belongs to the main context and fail to find the specified VI, since it is opened in a different context.

This has put a wrench or two in several NI Toolkits too and they were more than busy solving those issues so that an undocumented and not really official function like this simply had no chance to be noticed nor fixed. Personally I think one of the next versions of LabVIEW should definitely add some programmatic control of the printer subsystem to the VI server interface. Makes use of obscure C calls to internal fucntions obsolete.

Rolf Kalbermatter

Message Edited by rolfk on 07-25-2006 06:41 AM

Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 5 of 9
(3,693 Views)
Thanks Rolf for the explanation. I hope next version will have something like that. But I need to solve this problem now. I have no experience with C so is there someone who can help?
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 6 of 9
(3,687 Views)
Hi Jochynator,

The vi's you send works properly when I create an application (and with poject opened). So if you are not so particular about using source code, build an exe afterwards and surely it will work.

Kallis
BR
0 Kudos
Message 7 of 9
(3,680 Views)


@jochynator wrote:
Thanks Rolf for the explanation. I hope next version will have something like that. But I need to solve this problem now. I have no experience with C so is there someone who can help?

You don't write a single line of C for this. It is all VIs.

A print dialog that shows the available printers in a drop down box, an OK and Cancel button and the VI whose front panel you want to be printed as subVI and if you want to get fancy you can actually use VI server to load that subVI, prepare its properties to print on completion and run it in order to give you a fancy and generic print dialog.

Rolf Kalbermatter
Rolf Kalbermatter  My Blog
DEMO, Electronic and Mechanical Support department, room 36.LB00.390
0 Kudos
Message 8 of 9
(3,675 Views)
Problem is that I want to use my application in network environment and sometimes is necessary to find network printer. Other important things are aditional printer settings such as print quality, number of sheets per page... This cannot be done via myself programming! So this is why I need common print dialog!

After compiling it works? I'll try that. Better than nothing but still not enough.

Thanks. When anybody have better solution pls write!
jochynator
LV 8.0.1, WinXP Pro
0 Kudos
Message 9 of 9
(3,670 Views)