12-17-2020 08:18 AM
Hi,
Could someone please help me, i have reduced Some of my channels in a data set by reducing the channel length in Diadem View. The data has then been saved, when i reopen the .tdm file and try to reset the channel length it does not show all of the original data.
Have i lost the data by shortening the channel length?
If not, is there a simple way to restore a channel to its original length?
FYI i am using Diadem 2019 if that makes a difference. Script solutions also OK.
Many thanks Andy
12-17-2020 12:19 PM
If the file got rewritten you potentially lost your data. 😞
If it is an TDM file there is a very small hope if the channel was just shrinked.
The XML header (mighted me zipped) contains a block section:
<file byteOrder="littleEndian" url="TR_M17_QT_142-1.tdx">
<block byteOffset="0" id="inc0" length="250" valueType="eFloat64Usi"/>
<block byteOffset="2000" id="inc1" length="250" valueType="eFloat64Usi"/>
<block byteOffset="4000" id="inc2" length="250" valueType="eFloat64Usi"/>
lets assume the channels would have been shrinked and not rewritten it would look like this
<file byteOrder="littleEndian" url="TR_M17_QT_142-1.tdx">
<block byteOffset="0" id="inc0" length="100" valueType="eFloat64Usi"/>
<block byteOffset="2000" id="inc1" length="100" valueType="eFloat64Usi"/>
<block byteOffset="4000" id="inc2" length="100" valueType="eFloat64Usi"/>
which means you could calculate the old length.
4000 - 2000 = 2000 bytes
2000 / 8 (byte count of 64bit double) = 250
Which would allow you to adjust the values. But you also need to find the corresponding
<number_of_rows>100</number_of_rows>
entries to also set them to
<number_of_rows>250</number_of_rows>
so there is no easy solution and if the file has been rewritten on save the data is gone.
Maybe your in luck and you operating system has an old version of it.