06-17-2009 07:46 AM
Hi everyone,
I developed a real simple VI that enables me to read the first five bytes of a binary file to get its signature (ASCII) and verify if its signature matches with the expected extensions. If yes, another VI is called, and if not a 2 button message error is displayed : if the User chooses OK, then a new dialog box opens up to pick another file ; and if the user chooses Cancel, the same dialog box opens up rather than escaping the VI.
It is due to the while loop (VI below) but i don't see how I can handle this without it. Till the user hasn't chosen the right extension, it can't escape which is a problem! The true case consists in calling another VI, and the first step of the stacked sequence consists in displaying a two button error message.
If you have any ideas, I'm a bit new! Thanks !!
Solved! Go to Solution.
06-17-2009 07:55 AM
Hi christoph...,
i can't see the dialog function. Can you please upload your vi?
Mike
06-17-2009 08:22 AM
Sure Mike!
I didn't preview...
06-17-2009 08:46 AM
Why is it so hard to just upload a VI
Use the File Dialog Express VI Owning Palette: Advanced File VIs and Functions. Then you just vire the string *.ptm;*.ptw to the pattern label input
06-17-2009 08:49 AM
It would be easier to help if you had attached the actual VI rather than screenshots.
I think you have an issue by using a stacked sequence structure (both frames will execute no matter what you do).
Take a look at this thread where the original poster was trying to do a similar activity with choosing and rechoosing filenames.
http://forums.ni.com/ni/board/message?board.id=170&thread.id=416757
06-17-2009 08:53 AM
Hi christoph...,
you should connect the negatived output of the msg dialog to your while condition.
Mike
06-17-2009 09:44 AM
Thanks for your replies!
I have tried your solution CoqRouge, filtering the extensions. But it seems that you can choose between different filters when the dialog box opens up, and then choose any kind of extensions.
@RavensFan : I cannot load the VIs attached in this thread because I am using an older version of Labview
@MikeS81 : Which negative ouput?
06-17-2009 10:15 AM - edited 06-17-2009 10:17 AM
Hi christoph...,
see the attached image.
The false case contains only a true constant connected to the while condition.
Mike
06-17-2009 10:28 AM
It is just a tip. Go help help in toolbar then select find examples and search for listbox. Select the "Listbox for File Explorer Demo.vi" By modifying this VI you can have better control with the selectable file types. Just remember to use the save as option then saving after modifying
06-17-2009 10:45 AM
christophe69000 wrote:
RavensFan : I cannot load the VIs attached in this thread because I am using an older version of Labview
Here is that file from the link saved for LV8.0