05-18-2022 01:09 AM
Is there a simple way to replace a value of a channel (e.g., a 1D DBL array) in a TDMS file?
I can
They both work but both are too slow due to overhead work. If there is a direct and easier way, I would love to know.
Thanks.
XL
Solved! Go to Solution.
05-18-2022 02:21 AM
Hi XL,
TDMS is optimized for writing measurement data to files very fast. It's not meant to edit such files later on - but you can do so using the approaches you already mentioned.
I can suggest one more way:
When you know the underlying datatypes you could overwrite the value in the file directly using WriteBinaryFile. All you need to do is to search/find the correct position of the value in the file… 😉
05-24-2022 10:13 PM
GerdW
Thanks for your suggestions, good to know that I am not missing an easy method to do it.
I am actually migrating files from binary to TDMS to take advantage of some of the TDMS functions. 😄
Knowing there is not an easy way to replace data in a TDMS file, I am planning to write to TDMS with new data, and when read, just read the whole data set, and remove the data to be replaced. On top of that, I will consolidate data and save to a new TDMS regularly.
Thanks.
XL