DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Import channel names when starting a script.

Have tried looking around commands and discussions, but i haven't found anything on this so far.

I am looking to form a script around the basis of selecting a certain data channel in the NAVIGATOR window, then hitting say F3 to run a script that will take the names of the highlighted channels and recognize them, is this possible?

Any hints would be appreciated, thank you in advance!

0 Kudos
Message 1 of 2
(4,009 Views)

Hi Aryk,

 

If you mean making channel selections in the Browser of the NAVIGATOR panel, here's a good start for you:

 

Set DataFinder = Navigator.Display.CurrDataFinder()
Set Selection = DataFinder.Browser.SelectedElements
jMax = Selection.Count
ReDim FilePaths(jMax)
ReDim GroupNames(jMax)
ReDim ChanNames(jMax)
For j = 1 TO jMax
  IF Selection(j).IsKindOf(eSearchChannel) THEN
    k = k + 1
    FilePaths(k)  = Selection(j).ChannelGroup.Root.Properties("FullPath").Value
    GroupNames(k) = Selection(j).ChannelGroup.Name
    ChanNames(k)  = Selection(j).Name
  END IF
NEXT ' j
MsgBox Join(FilePaths, vbCRLF)
MsgBox Join(GroupNames,vbCRLF)
MsgBox Join(ChanNames, vbCRLF)

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

Message 2 of 2
(3,956 Views)