01-20-2023 02:42 AM
Hi
Is there a way to replace one specific "row" of data in a TDMS file?
The file is huge, so reading the whole file, do the changes and then create a new TDMS, is not an option.
If i write to a specific row, all the next data are deleted (?), and this row becomes the last one
Thanks
Solved! Go to Solution.
01-20-2023 03:39 AM
Hi pante,
@pante wrote:
Is there a way to replace one specific "row" of data in a TDMS file?
There is: "reading the whole file, do the changes and then create a new TDMS"...
(TDMS is made for streaming measurement data into a file very fast, but not for editing contents later on.)
01-20-2023 04:12 AM
Thanks... i was afraid this was the correct answer.
Is there another file option?
Or i must switch to a database?
01-20-2023 07:00 AM
@pante wrote:
Thanks... i was afraid this was the correct answer.
Is there another file option?
Or i must switch to a database?
I assume you can handle it as a binary file and set the file pointer to the byte in question and overwrite it. But if you need to insert values so the size changes there's no other solution than creating a new file.
However, you don't need to read all at once, you can copy e.g. 1MB chunks to a new file and change/insert as needed.