LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to diable file path prompt?

Everytime I hit the run button the file path prompt opens up, how can I disable it? I want to manual click the folder icon to open up browse window. Here is my code.

0 Kudos
Message 1 of 8
(4,851 Views)

If the path control is empty, then the Read Spreadsheet File will automatically pop up a File Open dialog box.

 

What you need to do is select a path BEFORE you run your VI.

0 Kudos
Message 2 of 8
(4,849 Views)

Is there a way to leave it empty and not have the dialog box open?

0 Kudos
Message 3 of 8
(4,845 Views)

@panoramarts wrote:

Is there a way to leave it empty and not have the dialog box open?


What would be the point to run the VI if there is no file to open???

 

You could use a loop and an event structure and place the file operations inside an event case that is triggered by a value change of the path control.

0 Kudos
Message 4 of 8
(4,839 Views)

I have other things happening so I don't want a dialog box for file path as the first thing to happen. Just like in any software it does not ask you for file path once you open up a program unless its targetted to do so. It would be nice that if could click browse button and navigate through the file, but don't need a prompt.

0 Kudos
Message 5 of 8
(4,827 Views)

So... did you try my suggestion?

0 Kudos
Message 6 of 8
(4,823 Views)

@panoramarts wrote:

Just like in any software...


Well, that doesn't magically happen. Someone had to write it that way. This means you have to write it that way too....

0 Kudos
Message 7 of 8
(4,811 Views)

@panoramarts wrote:

I have other things happening so I don't want a dialog box for file path as the first thing to happen. Just like in any software it does not ask you for file path once you open up a program unless its targetted to do so. It would be nice that if could click browse button and navigate through the file, but don't need a prompt.



That's all well and good, but any other software tends to be able to other stuff.  Your program only does one thing, read a spreadsheet file.  Nothing else.  If you don't want it to do that right away, then  you need to follow Altenbach's suggestion and program in an event structure that waits until the file path has changed.  Then once you do that, you will need to handle some other things like what if the user Cancels the dialog box.  Or they enter a filename that doesn't exist.

0 Kudos
Message 8 of 8
(4,797 Views)