11-21-2008 02:26 PM
I would like to use TDMS file viewer inside a dialog VI. The problem occurs if I change VI properties - Window Appearance - Window Behaviour to MODAL (It should be modal).
When I click the button and run TDMS file viewer both windows (my VI and TDMS file viewer) become modal and "lock" each other: I cannot control any of them.
Is there a possibility to use TDMS file viewer as a dialog ?
Thanks in advance,
Ljubo.
Solved! Go to Solution.
11-28-2008 05:21 AM
Hi Ljubo,
Thanks for your post.
So let me understand what your trying to do - you want to display the TDMS data to the user?
If your screens are locking - this could be caused by the event structure. Could you please attach your vi?
Your vi will stop running while the viewer is open.. is this what your seeing maybe.
Please let me know more of the details,
Kind Regards,
James.
11-28-2008 05:51 AM
Hi James
thanks for your answer. The VI is attached (LV version: 8.6f1).
I hope you will get an idea.
Regards, Ljubo.
11-28-2008 06:06 AM
Hi Ljubo,
Thanks for the code.
I have writen an example LabVIEW 8.6 which works.
Try it out and let me know.
Also, please see example Read TDMS File in the Example Finder - is shows you how to display the data on the front panel, which could be useful.
Kind Regards,
James.
11-28-2008 07:20 AM
Hi James,
I tried your VI. It works unless I change VI's properties. I would like it to be a dialog VI. Why ? This VI should be a small part of an application which is used to analyze a set of TDMS files. When this VI is called no other window should get focus. User should have a possibility to check briefly all the properties (acquired signals are not so important in that case). Using TDMS File Viewer is the most simple way to do it because it can read TDMS files with different set of properties and because it show all the proerties in a nice "tree structered" diagram.
So I set VI's properties as it is mentioned in my post: Window Appeareance = Dialog.
In that case VI window and TDMS File Viewer window are modal and they "lock" each other.
Your VI is attached (property "Window Appearance" is set to "Dialog").
Regards,
Ljubo.
11-28-2008 07:52 AM
One to keep in mind, do you changes on a copy of the TDMS file viewer, and not on the one in VI.lib. With an upgrade/reinstall of LabVIEW you will forget this little change, and you are back at square one.
Ton
12-01-2008 05:50 AM
Hi Ljubo,
Good Morning and I hope your well.
Sorry about that - I completely forgot about the mode.
You are in catch 22 here - the idea of the dialog box is to lock out other LabVIEW windows - and your event structure is waiting for the tdms viewer to close.
So, the better question is, why are you using the dialog box? You can use property nodes to alter the apparence of the window for example.
Please let me know,
kind Regards,
James.
12-02-2008 06:10 AM
Hi James and TonP,
I tried to change TDMS File Viewer VI properties (VI Properties - Window Appearance - Window Behaviour = MODAL). It works! Of course, you should make a copy of original TDMS File Viewer VI (vi.lib).See TonP's suggestion (message 6).
So, thank you for your cooperation. I'm satisfied with this solution.
Best regards,
Ljubo.