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.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Modification to Open/Create/Replace file vi in Labview

I'm a relative newbie to LabView so this modification described below is a daunting task for me, given the complexity of the block diagram in the Open/Create/Replace file vi .
 
I want to change the dialog box and choices when you have selected a file that already exists from Replace or Cancel as the only 2 options to:
ReplaceFile  AddToExistingFile  RePromptForANewFile QuitApplication  (this 4 option choice is my first preference)
or at minimum
ReplaceFile  AddToExistingFile  Cancel (adding AddToExistingFile as an option) 
 
0 Kudos
Message 1 of 4
(2,467 Views)

First of all, you should know that playing with the VIs supplied with LV is not always a good idea and open\create\replace is an example for a particularly not-good-for-editing VI. In any case, you should not overwrite the original.

In this case, you can use Edit>>Find to find the 2 button dialog you're seeing. When I look at where it's located, it's enough to discourage any thought about changing the VI. At the moment it has a single output (overwrite?). You could replace it with a subVI which will have all your buttons, but you will need to add code to handle the extra buttons, which can be very dangerous.

You may wish to create a much simpler logic instead which will do what you want yourself (using the VIs in the File I/O>>Advanced palette, like Open File and File properties), which will probably be safer.


___________________
Try to take over the world!
0 Kudos
Message 2 of 4
(2,461 Views)
Just to reassure:  I most certainly would not overwrite the existing Open/Create/Replace File vi, but would save the modification under a new name.    
0 Kudos
Message 3 of 4
(2,456 Views)
I agree with the create a new one, but make sure not to use the / in the filenames. If you ever have to build an exe it will fail because of these.
0 Kudos
Message 4 of 4
(2,444 Views)