08-13-2013 10:36 AM
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?)
08-13-2013 10:54 AM
Whats wrong with changing the start path everytime? Makes for nice compact code...
(assuming I understood your question correctly)
08-13-2013 10:57 AM
What Function is that?
I am using the file path control...
08-13-2013 11:04 AM
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...
08-13-2013 11:51 AM
Just set the start path to the last path stripped once
08-13-2013 11:54 AM - edited 08-13-2013 11:56 AM
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!
08-13-2013 12:04 PM
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.
08-14-2013 02:53 AM
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?