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: 

DIAdem Crash After Installation of New Windows Patch

When trying to run scripts in DIAdem, DIAdem crashes without any error message. This weekend the new windows patch was installed on my computer. What is the cause of the crashes when I run scripts that worked just three days ago? What can I do to fix it? Thanks.
0 Kudos
Message 1 of 5
(3,171 Views)

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

0 Kudos
Message 2 of 5
(3,143 Views)
Thanks for replying. Mine were all winXP, but I think the problem now is the serial evaluation. I am using "USeFileList" to pull in multiple repetitive data sets. The old scripts with it do not work and the old scripts without it do. Is there another way to write a similar command to "UseFileList"?
0 Kudos
Message 3 of 5
(3,135 Views)
Thank you for your help. I figured the problem out. Not sure what it was, but I just rewrote the whole entire thing letter by letter and it worked. Some odd reason a new exact copy works.
0 Kudos
Message 4 of 5
(3,131 Views)

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

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