DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Turn off screen updating while a DIAdem script is executing.

Hello,
 
Does anyone know what line or lines I would add to a DIAdem script to prevent the screen from updating as the script runs?  I have tried UIAutoRefreshSet and the similar commands I found in the help file, but my screen still flickers and flashes while the code is running.  Can someone please help me?
 
I am changing marker styles (removing and adding markers to all curves in a VIEW sheet) using DIAdem 11, if that helps.
 
Thanks for the help.
0 Kudos
Message 1 of 6
(4,866 Views)

Hi Internati...

Well, the other thing I would try is to use the View object property:

View.AutoRefresh = FALSE
                :
   (your code here)
                :
View.AutoRefresh = TRUE


But you might also want to check and make sure that you don't have any VIEW events registered:

View.Events.OnActiveSheetChanged = ""
View.Events.OnCursorChanged = ""

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 6
(4,840 Views)
Thanks, Brad!  This appears to have done a good job of reducing the screen updates.
0 Kudos
Message 3 of 6
(4,826 Views)

Is there something similar for a sud that I assigned to an area in VIEW?

 

Sometimes when I press a button in my sud, I change the visibility of other controls several time during the script execution and I can see the controls visibility flickers even with View.AutoRefresh = FALSE.

 

Thanks.

0 Kudos
Message 4 of 6
(2,305 Views)

Hi Alex,

 

How long does your script run when you press those SUDialog buttons in the embedded VIEW area?  If it's more than a second, you might consider using WndShow("ANALYSIS") to switch away from the VIEW panel while your script runs, followed by WndShow("VIEW") to switch back when it's done.

 

You might also verify that you have the script engine in DIAdem configured not to show updates while the script is running.  You can call this programmatically with:

 

Call UIAutoRefreshSet(0)

 

Sometimes after heavy changes it can help to toggle that setting after the script is done, like this:

 

Call UIAutoRefreshSet(1)

Call UIAutoRefreshSet(0)

 

Otherwise... I'm running out of silver bullets.  I also don't have a lot of practical experience building and using GUIs that have an embedded SUDialog in a VIEW area.

 

Brad Turpin

Principal Technical Support Engineer

NI

0 Kudos
Message 5 of 6
(2,284 Views)

I do not see a significant change but anyway I manage to optimize my script and it's so quick now that it's tolerable.

 

Thank you.

0 Kudos
Message 6 of 6
(2,277 Views)