NI Home > Community > NI Discussion Forums

LabVIEW

Showing results for 
Search instead for 
Do you mean 
Reply
Member
stoeckel
Posts: 105
0 Kudos

Write to text file. Append to existing file. Create file if file doesn't exist.

Hi folks,
 
up to LabVIEW 7 there was a wonderful "Write to Text File" vi which allowed the option "Append to File". Now, in LabVIEW 8, this old vi is not longer supported anymore. Instead, I am suggested to use a new "Write to Text File" vi. This vi does not offer the option "Append to File" anymore. Rather it is proposed in the online help that one should use the "Set File Position" in order to append text to the file. This much less straightforward than the old solution. Furthermore, I miss an option which would create the complete path if it doesn't exist yet.
 
To summarize: Isn't there really any smart "Write to Text File" vi available which offers both the options "Append" and "Create path if file does not yet exist". Of course, I could write such a file on my own but I am sure that it is of such general interest that it already exist. In any situation, when a log file shall be written, the wanted vi would be ideal.
 
Thanks a lot,
Peter
Trusted Enthusiast
RayFarmer
Posts: 4,652
0 Kudos

Re: Write to text file. Append to existing file. Create file if file doesn't exist.

Peter,

Sometimes the original VI is placed in a sub folder call Old.

Regards

Ray Farmer

Regards
Ray Farmer
Member
stoeckel
Posts: 105
0 Kudos

Re: Write to text file. Append to existing file. Create file if file doesn't exist.

Ray,
 
I know that the old vi is still available. See the screenshot which I attach to this message. What I am missing is an option "Create file or even complete path if file or path do not yet exist.". Is there any reason why NI doesn't provide neither this option nor a simple "Append to file" functionality in the new "Write to Text File" vi?
 
Regards,
Peter
Member
stoeckel
Posts: 105
0 Kudos

Re: Write to text file. Append to existing file. Create file if file doesn't exist.

Ray,
 
I know that the old vi is still available. See the screenshot which I attach to this message. What I am missing is an option "Create file or even complete path if file or path do not yet exist.". Is there any reason why NI doesn't provide neither this option nor a simple "Append to file" functionality in the new "Write to Text File" vi?
 
Regards,
Peter
Member
Posts: 96
0 Kudos

Re: Write to text file. Append to existing file. Create file if file doesn't exist.

Hi,
I have currently the same problem. I don't want to take the old "write characters to file.vi" within my new developments in LV 8.2.  The append to file feature should be a must. Of course
another selfmade Sub-VI can solve this, but I think NI should provide this standard feature with the new "write to text file.vi".
btw: I'm very happy with other nice features in LV8.x like the extended formatting possibilities of variables.
Ciao,
Olli