DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

DataFileSaveGroup?

I'm looking for a way to save all channels o a certain group. It is very uncomfortable to do it with the DataFile SaveSel -command because I don't the number and names of channels.
Background: a mesurement yielts a variable nuber of channels. At last alle mesurement channels (one group) have to be saved.  But there are other channels (in other groups)  with data not to be saved.
0 Kudos
Message 1 of 4
(3,410 Views)
I am posting a little function that will be handy in that situation. It is generating a channelselection string from a group referenced by its name or index.You can use the channelselection string in the save function later.

function getGroupSel(group)
  if not isnumeric(group) then group = Groupindexget(group)
  chnsel = ""
  for i = 1 to groupchncount(group)
  chnsel = chnseladd(chnsel, "["&cint(group)&"]/["&cstr(i)&"]")
  next
  getGroupSel = chnsel
end function


msgbox GetGroupSel(1)
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 2 of 4
(3,389 Views)
Ok, this combination of GroupChnCount() and ChnSelAdd() function solves the problem.
I was wondering, that a GroupSave -function seems not to exist.  It should be a normal case that a hole group is to be saved.
0 Kudos
Message 3 of 4
(3,385 Views)
I agree. I filed a product suggestion.
Ingo Schumacher
Systems Engineering Manager CEERNational Instruments Germany
0 Kudos
Message 4 of 4
(3,382 Views)