DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

How to get the channel list form a file using a SUD?

Hello everybody.
 
I am trying to read the channel names from a file and store them in a list and then show it to the user using a listbox , so he can pick the channel or channels he needs for any further analysis.
 
When he had made his election, simply import by header the selected channel (s).
 
What I have made is a function that reads the header line by line and look for the "200", read the line, discard the "200," and store the string in an array.
 
Is there a better way to get the channel names?
 
Thank you in advance for your help.
0 Kudos
Message 1 of 4
(3,821 Views)
You didn't mention which DIAdem version you use. Starting with version 9, loading of a specific channel or a set of channels is supported by DIAdem directly.
 
Andreas
0 Kudos
Message 2 of 4
(3,808 Views)
Hi ingluisef...,
 
Yes, there is a built-in way in DIAdem to read out the channel names from a DAT file without loading it.
 
Call DataLoadHdFile(DatFilePath)
FOR i = 1 TO FileChnNo
  Msg = Msg & "Ch(" & i & ") = """ & FileChnName(i) & """" & vbCRLF
NEXT
MsgBox Msg
 
Regards,
Brad Turpin
DIAdem Product Support Engineer
National Instruments
0 Kudos
Message 3 of 4
(3,800 Views)

Thank you Andreas, thank you, Brad.

I was not as specific as I tought. I am a Diadem 8.1 user. Brad, I used your suggestion and it worked much better than my procedure.

Thanks again for your interest, guys.

0 Kudos
Message 4 of 4
(3,755 Views)