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.
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.
08-20-2007 10:42 AM
08-21-2007 08:13 AM
Hi HockeyDude,
I installed the new Windows patch recently as well-- on 3 computers, and the DIAdem 10.1, 10.2, and 10.2 versions on each computer still work fine. What DIAdem version do you have? Was this a patch for WinXP or for Vista? Mine were all WinXP.
Brad Turpin
DIAdem Product Support Engineer
National Instruments
08-21-2007 01:28 PM
08-21-2007 02:04 PM
08-23-2007 10:32 AM
Hi Hockey Dude,
I vastly prefer an explicit loop to the serial evaluation mode. Here is example code to create the array of file paths from a multi-selection file dialog:
DlgTitle = "Insert File Dialog Title Here..."
StartPath = ProgramDrv & "Libr\Dat\"
FileExts = "*.DAT;*.TDM"
Call FileNameGet("Any", "FileRead", StartPath, FileExts, "Nul", True, DlgTitle)
FilePaths = Split("|" & FileDlgFileName,"|")
Call BubbleSort(FilePaths) ' sort the array of file names alphabetically
MsgBox OutputArray(FilePaths)
'-------------------------------------------------------------------------------------
'-- BubbleSort() -- -- NEW SUBROUTINE --
'-------------------------------------------------------------------------------------
Sub BubbleSort(NamesToSort)
Dim i, SwapName, Swapped
Do ' Until bubble sort of NamesToSort() is finished
Swapped = False
FOR i = 1 TO UBound(NamesToSort)-1
IF StrComp(UCase(NamesToSort(i)), UCase(NamesToSort(i+1))) > 0 THEN
SwapName = NamesToSort(i)
NamesToSort(i) = NamesToSort(i+1)
NamesToSort(i+1) = SwapName
Swapped = True
END IF ' Name(i) and Name(i+1) need to be swapped
NEXT ' i
Loop Until NOT (Swapped)
End Sub ' BubbleSort()
'-------------------------------------------------------------------------------------
'******* OutputArray() *** *** NEW Function ***
'-------------------------------------------------------------------------------------
Function OutputArray(ArrayVar)
Dim i, HdrMsg, Msg
HdrMsg = " i " & vbTAB & "ArrayValues(i)" & vbCRLF
HdrMsg = HdrMsg & "-----" & vbTAB & String(60, "-")
FOR i = 1 TO UBound(ArrayVar)
Msg = Msg & " " & i & " " & vbTAB & ArrayVar(i) & vbCRLF
NEXT ' i
OutputArray = Msg
End Function ' OutputArray()
Brad Turpin
DIAdem Product Support Engineer
National Instuments