From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.
We appreciate your patience as we improve our online experience.
05-17-2022 08:58 AM
So I have a block diagram that saves csv file every 30 seconds. So Before I even start running, I would like my block diagram to prompt me to save a file by bring file explorer as shown below without messing up the functionality of my block diagram. I still want to be able to save the same file I am creating every 30 seconds.
I try messing with the property of the base path. I'm still unable to have my VI prompt me. I have tried using case structure before to create an initial file on another code I have and it has never worked for me.
Can someone please help me?
Solved! Go to Solution.
05-17-2022 09:16 AM - edited 05-17-2022 09:25 AM
Have you tried an action engine? Create an INIT case and have it initialize the save file prompt. You would still need to run the VI but it would force the VI to ask the user if they would like to save a file and handle that action prior to any further movement.
Blog for (mostly LabVIEW) programmers: Tips And Tricks
05-17-2022 10:11 AM
You need to change the "browse option" (right-click) of your path control to allow selecting new files. (You currently have it to allow only the selection of existing files)
(You still use inner loops to gum up your dataflow. Just don't!)
05-17-2022 10:17 AM
No, I have not. Does NI have an example for that?
05-17-2022 10:23 AM
Good morning Mr. Altenbach
I tried switching to New and I still don't have file explorer prompted.
Yes, I have to stop using these inner loops. I'll just stick with state machine.
05-17-2022 10:28 AM - edited 05-17-2022 10:29 AM
That's when you would press on the browse button next to the path control.
To prompt the user at runtime, call the "file dialog" function where you have all the same options. Make sure to also handle the situation where the user cancels the file dialog.
05-17-2022 10:31 AM
In my opinion, the "File Dialog" is a (the only) useful express VI. You can configure a starting path, default file extension, if you want to force a new file or allow an existing file to be written to/over, etc.
05-17-2022 10:35 AM
@StevenD wrote:
In my opinion, the "File Dialog" is a (the only) useful express VI.
The file dialog was even nicer before they changed it to an express VI many version ago. I am sure that one is still hidden somewhere deep inside vi.lib. 😄
05-17-2022 01:51 PM
Yes, it works fine now.