LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Problem when file path is not selected to read a file when button pressed

Solved!
Go to solution

Hi all,

Have programmed with event structure and while loop.

1. created a event for a button

2. when pressed it should read a file selected (I have not connected a path control)

When the button is pressed the particular folder pops up, from which user can select the file. But, instead of selecting the file, if the user clicks on cancel, the program instead of being on same front panel, proceeds to the next part of the code.

 

I want to program such that the user comes back to same front panel if he/she clicks on cancel during the file selection. How to program this?

 

Thanks in advance

 

0 Kudos
Message 1 of 4
(2,809 Views)
Solution
Accepted by topic author Deepa_Krishnamurthy

@Deepa_Krishnamurthy wrote:

Hi all,

Have programmed with event structure and while loop.

1. created a event for a button

2. when pressed it should read a file selected (I have not connected a path control)

When the button is pressed the particular folder pops up, from which user can select the file. But, instead of selecting the file, if the user clicks on cancel, the program instead of being on same front panel, proceeds to the next part of the code.

 

I want to program such that the user comes back to same front panel if he/she clicks on cancel during the file selection. How to program this?

 

Thanks in advance

 


Your VI can't even catch the 43 error that is generated (or you would have mentioned it), so you have to read up on how to handle errors.  That is the path to salvation.  (Catch the error, do something about it.)

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 2 of 4
(2,805 Views)

Thanks a lot!

0 Kudos
Message 3 of 4
(2,760 Views)

Glad I was able to help.  If you've noticed, we tend not make you work a bit for your solution.  That's because this is a learning forum as well.  I gave you the tools, but you made your own solution.  🙂

 

Good work!

Bill
CLD
(Mid-Level minion.)
My support system ensures that I don't look totally incompetent.
Proud to say that I've progressed beyond knowing just enough to be dangerous. I now know enough to know that I have no clue about anything at all.
Humble author of the CLAD Nugget.
Message 4 of 4
(2,751 Views)