From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DATAFILELOADSEL load group by name

Hi All,
I want to load a specific group of a tdms file into Diadem. Unfortunately there is a little race condition in my labview code that causes this goup to sometimes have index 3, other times index 4. No sweat, I thought, I'll just load the group by name!
Unfortunately the DATAFILELOADSEL  function doesn't seem to support this syntax, so I will have to first search for the index. Can anybody tell me how to first search the index of a specific group name?
BTW. I want to find the index without first having to load the whole file (they are large!).
Thanks!
Aart-Jan
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 1 of 5
(3,534 Views)
Hi Aart-Jan,
I had a similar problem some time ago and work around it by "registering" the data in the portal
Call DATAFILELOAD(filename,"","Register")
This goes a lot faster then loading the file and you can access group indices etc. Then you clear the data portal
Call DATADELALL
and load your specific data with DATAFILELOADSEL 
Hope this helps.
DavidS!
 
also see:
0 Kudos
Message 2 of 5
(3,527 Views)
mm, got it working after all. Sorry..
CALL DATAFILELOADSEL(file,"TDMS","LF analysis/*","")
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 3 of 5
(3,526 Views)
Thanks David, indeed, registring was my workaround to be searching for channel names. Do you know how to write commands for searching groups by name?
My problem is solved, but I am interested in doing such things (including looping and such) in Diadem.
Thanks,
Aart-Jan
------------------------------------------------------------------------------------
Seriously concerned about the Labview subscription model
0 Kudos
Message 4 of 5
(3,524 Views)

Dear Aart-Jan,

I'm not sure if I got your problem correctly, but maybe this is what you're looking for:

For i = 1 to GroupCount   ' Loop over all groups
  If GroupName(i) = "TurbulenceLengthdScales" Then
    exist = TRUE
    Exit For
    else
    exist = FALSE
  End If
Next
If exist Then
CAll Msgbox("Group has index no: " & i)
else
CAll Msgbox("Group does not exist")
End If

Regards,

DavidS!

0 Kudos
Message 5 of 5
(3,520 Views)