DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

SUD Control OnEvents

Solved!
Go to solution

I would like to kniw how to refresh a control while I am executing an script. I have already tried with the Refresh method.

 

Attached there is SUD that shows my problem

 

Thank you in advance

 

 

0 Kudos
Message 1 of 4
(4,971 Views)

Hi dslemusp,

 

Are you calling the SUDialog non-modally or modally-- put another way, are you using SudDlgShow() or SudDlgCreat() to call the dialog?

 

Is the "script" you're referring to the script that calls the SudDialog, some script code running in the dialog, or is it supposed to be a script running in parallel with the SUdialog?

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 2 of 4
(4,925 Views)

I have tried to load the SUD modal and non-modal, but It doesnt work. The Control I am trying to refresh gets freezed and only shows the final value once the script is finished.

 

The Script I am refering is the one which the SUD executes once you press a button (In this Example the Exe Button). Actually I call a function registered in the user command. But I also made the test pasting the function inside the SUD and It has the same behavior.

0 Kudos
Message 3 of 4
(4,918 Views)
Solution
Accepted by dslemusp

Hi dslemusp,

 

I talked to R&D about this, and the short answer is that the Windows operating system technology the SUDialogs are using blocks the display you're hoping for.  The best workaround we could come up with is a non-modal pop up dialog:

 

Sub Button1_EventClick(ByRef This) 'Created Event Handler
  Report.NewLayout
  Dim i, Txt
  For i = 1 to 5
    Txt = "Progress " & i*100/50 & "%"
    Call MsgBoxDisp(Txt, "MB_NOBUTTON", "MsgTypeNote", 0, 0, 1)
    Pause(2)
  Next
  Call MsgBoxCancel
  Status.Text = "Done"
End Sub

 

Another option would be to control the DIAdem progress bar in the lower right hand corner of DIAdem.

 

Brad Turpin

DIAdem Product Support Engineer

National Instruments

0 Kudos
Message 4 of 4
(4,874 Views)