07-01-2004 07:01 AM
07-01-2004 07:38 AM
07-01-2004 09:34 AM
12-01-2024 06:58 PM
Hi, what do you mean by send an end of line constant to the file? I have an end of line constant in the concatenation of a string that I then pass through to write to text file, and i keep overwriting the top line it seems
12-01-2024 09:29 PM
@LShek wrote:
Hi, what do you mean by send an end of line constant to the file? I have an end of line constant in the concatenation of a string that I then pass through to write to text file, and i keep overwriting the top line it seems
You replied to a 20 year old thread with a slightly different problem.
Obviously, you are overwriting instead of appending, and that can have many possible reasons. Without seeing your vi, we cannot tell what you are doing wrong.
12-02-2024 08:52 AM
When you open a file, the write (or read) pointer is initially located at the beginning. If you want to append data, you need to use the Set File Position function to move it to the end. Some vis (for example Write Delimited Spreadsheet) let you specify an Append flag so you don't need to do this explicitly.
12-02-2024 10:14 AM
@pincpanter wrote:
When you open a file, the write (or read) pointer is initially located at the beginning. If you want to append data, you need to use the Set File Position function to move it to the end. Some vis (for example Write Delimited Spreadsheet) let you specify an Append flag so you don't need to do this explicitly.
That's why I said that there are so many possibilities. The mentioned "Write to text file" is a low level primitive and if the file is kept open, the pointer will automatically be after the last write, i.e. appending. No need to set the file position unless the file is opened from scratch.
I intentionally did not list a litany of possible solutions until we can narrow it down to the actual scenario. :D.