Hello,
I'm using a small application which is using the function NationalInstruments.Tdms.TdmsFile.Defragment(String path)
to deframent large TDMS files.
This works fine for all TDMS files generated by (Measurement Studio's) NationalInstruments.Tdms namesapce classes/methods e.g. streaming data per NationalInstruments.Tdms.TdmsChannel.AppendData() or per NationalInstruments.Tdms.TdmsChannelGroup.AppendAnalogWaveform()
for instance TDMS-files which were generated by example \National Instruments\Measurement Studio\Examples\DotNET\v4.5\TDMS\Streaming\cs
However, the same application does not work for TDMS-files automatically generated by "NationalInstruments.DAQmx.Task.ConfigureLogging()"
for instance created by example program .\National Instruments\NI-DAQ\Examples\DotNET4.5\Analog In\Measure Voltage\TdmsAcqVoltageSamples_IntClk\CS
In this case the method Tdms.TdmsFile.Defragment(String path) fires following error:
ErrorCode: -6619
HResult: -2146233087
Message: "An unexpected error occurred.\r\n"
StackTrace: " at NationalInstruments.Tdms.Internal.a.b(String A_0)\r\n
at NationalInstruments.Tdms.TdmsFile.Defragment(String path)\r\n
at PsMonTool.Defrag.MainForm.backgroundWorker1_DoWork(Object sender, DoWorkEventArgs e)
in C:\\MainForm.cs:line 58"
one more hint from debug trace:
cannot convert from 'System.Collections.Generic.IEnumerable<System.Reflection.CustomAttributeData>'
to 'System.Collections.Generic.ICollection<System.Reflection.CustomAttributeData>'
Kindly investigate why those TDMS files cannot be defragmented.
Many Thanks.