From Saturday, Nov 23rd 7:00 PM CST - Sunday, Nov 24th 7:45 AM CST, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

Measurement Studio for .NET Languages

cancel
Showing results for 
Search instead for 
Did you mean: 

An unexpected error occurred at NationalInstruments.Tdms.TdmsFile.Defragment()

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.

0 Kudos
Message 1 of 1
(134 Views)