LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

option to continue with empty file path without saving

Hi Steffi,

did you have a look at the block diagram? You will find the same as in Jorge's picture!

Mainly I cleaned up your vi, but I changed the path constant from "not a path" to "empty path".
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 11 of 26
(1,252 Views)
Ok, now I got what you both mean... I'm sorry, this is new stuff to me... Sorry.

But my vi still doesn't run the way I want it to...: ( I only have to change the error message to "no dialog", right? I did it for both vi's ("write characters to file" and "write to spreadsheet file"). And I changed the no path constant to an empty path constant. But when I hit the save button now and then click cancel, it asks me again and again where I want to save the data.  So I can't really cancel it. I HAVE to enter a file path: (
Do you have an idea why?

Steffi
0 Kudos
Message 12 of 26
(1,248 Views)
Right click on the save button and select the one that I've on the picture.
Software developer
www.mcm-electronics.com





PORTUGAL
0 Kudos
Message 13 of 26
(1,246 Views)
Hi Steffi,

either use Jorge's suggestion or change your dataflow!

Did you try the highlighting tool to check where the filename gets lost? Did you check which function is asking you for a new filename?
Maybe you should delete the "empty path" in the (bigger) false case and replace it by a simple wire to remember the filename?



Message Edited by GerdW on 11-21-2007 03:26 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 14 of 26
(1,239 Views)
Thank you, Jorge. This works. But I have to click "cancel" twice, do you know why? At least the program still runs after I clicked the "cancel button" twice.
But now I have another problem: If I do want to save data and enter a file path the data is saved, but the button says that data isn't saved. This is confusing for the user and as I don't use it by my own... Do you have another idea?

THANK YOU!
0 Kudos
Message 15 of 26
(1,237 Views)
Hi GerdW,

I don't know where the highlighting tool is, sorry.
Unfortunately your suggestion (delete the "empty path" in my bigger false case and wire it to the other to remember the path) doesn't work, sorry.

Did you read my reply to Jorge? Do you know how to save this "little problem"?

Thank you!!
0 Kudos
Message 16 of 26
(1,231 Views)
Hi Steffi,

the highlighting tool is the little bulb in the block diagram. It helps to see the dataflow Smiley Happy

What exactly do you want?
Do you need the button to decide between "save data" and "don't save data"?
Do you need the button to enable the input of a new filename?
Should vi save data as soon as there is a filename given in the file path control or only when the button is set to "save data"?

Did you make copies before changing the "write to text/spreadsheet" functions? It's very critical to change functions from vi-lib!


Message Edited by GerdW on 11-21-2007 03:49 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 17 of 26
(1,226 Views)
I have an idea:

do you know a way how to communicate between my VI and the "write characters to file.vi"? My idea is to create a local variable for the error message in the "write characters to file.vi" and to connect it to my vi, means if an error occurs (by clicking cancel) I can read and wire the variable to a case structure which gives an empty path in case of "cancel".

Do you know if this works? A local variable doesn't work. Do you have another idea?

Thanks,
Steffi
0 Kudos
Message 18 of 26
(1,223 Views)
Thank you, GerdW.

Yes I made copies before, thanks. : )
I need the button to decide between "save data" and "don't save data".
But with the option to cancel it if the dialog box is prompted.
The button should be switched on if I save data and it should be switched off if I don't save data.
The vi should only save data when the button is set to "save data".

Thanks.

0 Kudos
Message 19 of 26
(1,219 Views)
Hi Steffi,

that's the reason for using error clusters!!!

Again: make a copy of the "write to text" function. Create an error cluster indicator at the error output of "General Error Handler" (lower right corner of the icon). Connect the indicator in the connector pane (preferred also the lower right corner). Now you get the error information also to your vi - no need for locals/globals!
When the user cancels the file selection you should get an error code 43...

From your questions I would suggest you to read the manual and have a look at the 3h and 6h courses at the NI website! (maybe here?)


Message Edited by GerdW on 11-21-2007 04:01 PM
Best regards,
GerdW


using LV2016/2019/2021 on Win10/11+cRIO, TestStand2016/2019
0 Kudos
Message 20 of 26
(1,216 Views)