LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

file path saves last folder option

Alrighty folks,

 

Is there a way to make the filepath the last file location accessed as the start path when the icon is clicked in real time? (instead of having to find the folder again every time and without changing the start path every time?) 

0 Kudos
Message 1 of 8
(3,605 Views)

Whats wrong with changing the start path everytime?  Makes for nice compact code...

(assuming I understood your question correctly)

 

 

2013-08-13 10_52_50-Untitled 1 Block Diagram _.png

0 Kudos
Message 2 of 8
(3,590 Views)

What Function is that? 

I am using the file path control...

0 Kudos
Message 3 of 8
(3,586 Views)

Just one of the standard file VIs.

It sounded like you were working with them because of the statement: "instead of having to find the folder again every time"

So it sounds like I did mistake what you are trying to do.

Could you provide a screen shot or a better explanation?  I cant make heads or tails so far...

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

Example_VI_BD.png

Just set the start path to the last path stripped once


"Should be" isn't "Is" -Jay
0 Kudos
Message 5 of 8
(3,560 Views)

Zyshan wrote:

Is there a way to make the filepath the last file location accessed as the start path when the icon is clicked in real time? (instead of having to find the folder again every time and without changing the start path every time?) 


If you are talking about the "browse" button of a path control, LabVIEW already does this for you! Once you have a file selected, the next browse operation will start where the current file is located. Try it!

 

Your question is really not clear at all. What "icon" are you talking about. Icons are typically associated with the diagram, not the front panel. Is this at edit time or at run time?

 

What is "real time"? This term has a very specific meaning in LabVIEW and makes little sense in your context above!

0 Kudos
Message 6 of 8
(3,557 Views)

Altenbach is correct in that LabVIEW already remembers the file path for you, while the VI is running.  If, however, you are asking about storing the file path after closing the vi, then you need to do something extra.

 

Store the path in a configuration file which can be read upon first starting the vi.

0 Kudos
Message 7 of 8
(3,553 Views)

Apologies for the ambiguity of the question.

 


@pjr1121 wrote:

 

Store the path in a configuration file which can be read upon first starting the vi.



how do I do that?

0 Kudos
Message 8 of 8
(3,517 Views)