LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

write to measurement file - Create or replace with confirmation

Solved!
Go to solution

I'm using the "Write to measurement file.vi" and I want it to ask for confirmation if I try to save with a filename that already exists and then allow me to choose another file name or overwrite the old one. How can I do this?

0 Kudos
Message 1 of 28
(3,819 Views)

In this Express VI, select the box "Ask user to choose file."

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 2 of 28
(3,815 Views)

I've done this. The only options it has are:

  • Rename existing file—Renames the existing file if Reset is TRUE.
  • Use next available name—Appends the next sequential number to the filename if Reset is TRUE. For example, if test.lvm exists, LabVIEW saves the file as test1.lvm.
  • Append to file—Appends the data to the existing file. The VI ignores the value of Reset if you select the Append to file option.
  • Overwrite file—Replaces data in an existing file if Reset is TRUE.

 

But I want to have it ask for confirmation to overwrite, then let you save it as a different name if you want. Is there any way to combine something with this vi to do this, or do I need to find another vi that would let me do this?

0 Kudos
Message 3 of 28
(3,805 Views)
Solution
Accepted by topic author SuSto

That Express VI does not have the capability you are seeking. You will need to either convert it to a regular VI and modify it, or simply add some code to do what you seek. THis can be accomplished quite easily with the File I/O functions.

0 Kudos
Message 4 of 28
(3,802 Views)

@smercurio_fc wrote:

That Express VI does not have the capability you are seeking. ...


 

Help us Obe Wan, you're our only hope.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 5 of 28
(3,798 Views)

@Ben wrote:

@smercurio_fc wrote:

That Express VI does not have the capability you are seeking. ...


 

Help us Obe Wan, you're our only hope.

 

Ben

 


Did I misunderstand the question again?

0 Kudos
Message 6 of 28
(3,795 Views)

@smercurio_fc wrote:

@Ben wrote:

@smercurio_fc wrote:

That Express VI does not have the capability you are seeking. ...


 

Help us Obe Wan, you're our only hope.

 

Ben

 


Did I misunderstand the question again?


 

No.

 

 

Spoiler

Your wording reminded me of the scene from Star Wars when Ben Kanobe di dthe force thing on the strorm troopers telling them "These are not the droid you seek."

 

 

Its just Friday.

 

Ben

 

Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
Message 7 of 28
(3,791 Views)

Ben wrote:

No.

 

Spoiler

Your wording reminded me of the scene from Star Wars when Ben Kanobe di dthe force thing on the strorm troopers telling them "These are not the droid you seek."

 Its just Friday.


Ah. Gotcha, Kimosabe.

0 Kudos
Message 8 of 28
(3,779 Views)

Is there a way to combine the "write to measurement file express vi" with the "open/create/replace file" function? Or, more basically, is there a way to wire any file path through another function and into the "write to measurement" vi?

0 Kudos
Message 9 of 28
(3,747 Views)

@SuSto wrote:

 Or, more basically, is there a way to wire any file path through another function and into the "write to measurement" vi?


Of course, but you don't want to modify any LV functions (I don't know that you can).  This question seems so basic (too basic) perhaps I misunderstand what you are saying, but you can wire any reference through one of your VIs.

-----------------------------------------------------------------------------------------
Reese, (former CLAD, future CLD)

Some people call me the Space Cowboy!
Some call me the gangster of love.
Some people call me MoReese!
...I'm right here baby, right here, right here, right here at home
0 Kudos
Message 10 of 28
(3,745 Views)