DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to get TDMS files as filtered option in command "FileNameGet"

Solved!
Go to solution

Hey Folks,

 

I am trying to make a custom dialog box to generate some reports. I need help with the command "FileNameGet". Specifically when it is executed, it immediately filters for TDM files(I have never used this file extension). I have played around with two of the variables, "FileDlgFilt" and "FileDlgASCIIName"  with no avail. I am opening this file in the event " DataFile_Chooser_EventClick". 

 

Insight to what I could be missing would be greatly appreciated. 

 

THINGS I HAVE RULED OUT:

1) FileFilter1 being overwritten before being called

2) Ensured the correct dialog box file is being called 

3) Ensure the outputs of the File explorer work once I manually switch to tdms(I am able to get the correct file path out)

4) I did a weak attempt at completely overwriting the variables "FileDlgFilt" and "FileDlgASCIIName"  combined with not including those parameters in the function call

 

I have uploaded the files below.

 

NOTE: I am getting an error that my SUD file is not matching it data type so I am including the code here that is relavent:

 

 
 

Screenshot 2026-02-23 122551.png

0 Kudos
Message 1 of 3
(1,443 Views)
Solution
Accepted by topic author ArctiCat2003

Hi ArctiCat2003,

 

As the Help documentation says, if you use the "NAVIGATOR" value in the first parameter, then the FileDlgFilt parameter conveys the DataPlugin name to use, so you can do this for TDMS selection:

Call FileNameGet("NAVIGATOR", "FileRead", "DefaultFilePath", "TDMS")

 

If you really want multiple filters for the user to choose between, you need to switch to the "ANY" value, like this:

Call FileNameGet("ANY", "FileRead", "*", "TDMS Files,*.tdms|All Files, *.*")

 

Brad Turpin

Principal Technical Support Engineer

NI / Emerson

Message 2 of 3
(1,417 Views)

Hey,

 

I could have sworn I tried "TDMS" before in the fourth parameter but it still didn't work. I guess this was a rubber ducky event. THANK YOU!

0 Kudos
Message 3 of 3
(1,404 Views)