06-08-2012 09:49 AM
Hello,
I am having trouble trying to read the channel and group names from a .tdms file in a .NET application. When I open the tdms file using the Excel plugin, the channel and group names are nicely displayed. But in my .NET application, all I get is null for the names. The .NET assembly I am using to load the files is version 9.0.40.292. Is this a known bug and if so, does anyone know if it has been fixed or if there is a workaround?
Thanks!
Joel
06-08-2012 03:28 PM
I'd like to give it a try. Do you have a partial file you can upload as an example? Are you using VB or C#?
06-13-2012 12:02 PM
Hi,
Sorry for my slow response. Here is an example of the file I am talking about. I'm expecting to find a group named 'Events'. When I open the file, I can retrieve two groups. But neither has a name. According to the Excel plugin, at least one should. The same applies to the channel names. I cannot retreive any channel names belonging to the 'Events' group.
Thanks for looking into this.
Joel
06-14-2012 09:39 AM
I used LabVIEW TDMS VIs to view the TDMS file, and it shows three groups: one that is blank, one named "Untitled", and one named "Events". There are two channels; both have blank names.
06-14-2012 10:01 AM
Right, so I know they are in the file, however when I try to read that file from my C# application, the names come back blank.
06-14-2012 10:22 AM
I haven't worked that much with TDMS files. This is what LabVIEW is reporting back. Maybe the blanks are throwing off C#.
06-14-2012 10:24 AM
Yeah, either way it seems like a bug in the .NET libraries to me. Do you know if there has been any new releases of the .NET libraries?
06-14-2012
10:44 AM
- last edited on
05-13-2025
05:42 PM
by
Content Cleaner
Maybe you can try using the TDMS DLL https://www.ni.com/en/support/documentation/supplemental/06/the-ni-tdms-file-format.html
06-14-2012 10:50 AM
Maybe, but that would require a significant rewrite of my code. I guess if I exhaust all other options, the C DLL may be my only workable option. It's too bad, I'm sure the .NET DLL problem is minor and wouldn't be hard to fix. It would be nice for NI to make an update to that. Do you know if NI has a place that I can report bugs?
06-14-2012 03:51 PM
This sounds like the issue discussed here, but this is fixed with TDMS 2.0, which should install with Measurement Studio 9.0. What version of TDMS.dll do you have installed at C:\Program Files\National Instruments\Shared\TDMS? If you do not have 2.0, you could try installing the stand alone version found here.