LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I reference "ok" button in file path?

Here's a quick question, I am using the LabVIEW file path control icon, when you hit the little file browser up pops the window where one can browse  and select a file. Once they are happy they can hit the OK button. I am trying to embed this as a part of another program which I want to wait until the OK button is pressed. Where is the property node for the "OK" button? I can't seem to find it.

Download All
0 Kudos
Message 1 of 10
(3,655 Views)

It doesn't exist.  LabVIEW is actually calling the Windows file dialog.

 

Maybe what you need is an event structure with a case set to Path->Value Change.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
0 Kudos
Message 2 of 10
(3,650 Views)

@adamsdaq wrote:

Here's a quick question, I am using the LabVIEW file path control icon, when you hit the little file browser up pops the window where one can browse  and select a file. Once they are happy they can hit the OK button. I am trying to embed this as a part of another program which I want to wait until the OK button is pressed. Where is the property node for the "OK" button? I can't seem to find it.


I am just trying to understand what you mean by this?. Do you want to wait in the program you are running or in the browse window?.

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 3 of 10
(3,632 Views)

While that may work in most situations, what if the user selects the same path? I am suprised there is no way to do this.

0 Kudos
Message 4 of 10
(3,631 Views)

I want to wait in the program I am running. The real issue is I have the individual instance of this VI working great, however when I go to run it as a subVI embedded in a higher level program, if the path control is empty or has the wrong value the progam is not giving the operator the time to change it. Thus it would be very nice if some how I could use the operator acknowledging the correct path as a precursor to continuing with the program. I must admit I have very little experience programming in LabVIEW.

0 Kudos
Message 5 of 10
(3,627 Views)

@adamsdaq wrote:

While that may work in most situations, what if the user selects the same path? I am suprised there is no way to do this.


What do you mean by same path? So you have another option similar to this where the user selects the path. Please make it clear

-----

The best solution is the one you find it by yourself
0 Kudos
Message 6 of 10
(3,625 Views)

@adamsdaq wrote:

I want to wait in the program I am running. The real issue is I have the individual instance of this VI working great, however when I go to run it as a subVI embedded in a higher level program, if the path control is empty or has the wrong value the progam is not giving the operator the time to change it. Thus it would be very nice if some how I could use the operator acknowledging the correct path as a precursor to continuing with the program. I must admit I have very little experience programming in LabVIEW.


Good now its clear. What you can do is you can use a file dialog function (Available in advanced file functions) after the path control and keep it inside a case structure. Check the path control is empty or not if empty pass the path through the file dialog case or else just past it through the other. It all depends how you handle the sub vi from the top level and how you feed the path to it programatically.

 

-----

The best solution is the one you find it by yourself
0 Kudos
Message 7 of 10
(3,621 Views)

@adamsdaq wrote:

I want to wait in the program I am running. The real issue is I have the individual instance of this VI working great, however when I go to run it as a subVI embedded in a higher level program, if the path control is empty or has the wrong value the progam is not giving the operator the time to change it. Thus it would be very nice if some how I could use the operator acknowledging the correct path as a precursor to continuing with the program. I must admit I have very little experience programming in LabVIEW.


You can check the validity of the path, and if it is not suitable, call a file dialog function. Check the new path and also if the dialog go canceled and proceed as needed (ignore error, ask again, etc.)

 

Expection handling and such really needs to be done in code and LabVIEW has a rich selection of options. Is the path received from a connector to the subVI? Under what conditions is it empty?

0 Kudos
Message 8 of 10
(3,619 Views)

@altenbach wrote:

@adamsdaq wrote:

I want to wait in the program I am running. The real issue is I have the individual instance of this VI working great, however when I go to run it as a subVI embedded in a higher level program, if the path control is empty or has the wrong value the progam is not giving the operator the time to change it. Thus it would be very nice if some how I could use the operator acknowledging the correct path as a precursor to continuing with the program. I must admit I have very little experience programming in LabVIEW.


You can check the validity of the path, and if it is not suitable, call a file dialog function. Check the new path and also if the dialog go canceled and proceed as needed (ignore error, ask again, etc.)

 

Expection handling and such really needs to be done in code and LabVIEW has a rich selection of options. Is the path received from a connector to the subVI? Under what conditions is it empty?


I agree.  I also feel it is far better to prevent the user from doing something wrong than it is to let them do it and then try to recover from it.  For instance, I'd keep the "OK" button grayed out until a valid path was entered.  That way you avoid having to recover from "bad path was chosen after pressing 'OK'."

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.
0 Kudos
Message 9 of 10
(3,611 Views)

Hi everyone thanks for the help here, actually the way I wound up doing it was as others suggested to use the File Dialog express VI. I am not sure if it is the most elegant but now it pops up and only sends the value when selected, and since it pauses the program until selected it is a suitable work around.

0 Kudos
Message 10 of 10
(3,605 Views)