Starting in LabVIEW 2015 we got a neat new function that can create a unique file path, and allows to not overwrite a file that might exist with a similar name.
This is such a cool function and I could think of a ton of places where I needed to save some temporary data and just wanted a unique name expecteing files to be cleaned up later. Or give the user a checkbox which wouldn't overwrite the existing data, and then not need to worry about generating my own unique name.
Alas this function fell short of my expectations. Why? Because it creates the stupid file, and returns a reference to it, instead of just generating a path that I can use. What if I want to use this with the report generation toolkit and generate a unique file name? Well you can but you need to close the file reference it made, and possibly delete the file. Same with if you want to use this on a TDMS file, or a Configuration INI file, or a zip, etc.
I suggest either adding another function (polymorphic?), or making an optional input to this function, which does everything it currently does except don't run the Open/Create/Replace function there by making the file, and returning a file reference. Every time I've used this function to date it has been followed up with a Close File, then a Delete function.
Unofficial Forum Rules and Guidelines
Get going with G! - LabVIEW Wiki.
17 Part Blog on Automotive CAN bus. - Hooovahh - LabVIEW Overlord
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.