DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Refresh Navigator Device or Data Portal

I have developed a dailog whose basic functionality is calculation on channels( these channels can be seen in the data portal). I have linked the script file of this module to a newly created menu list. When I execute the script file directly and work with the Dialog I can see the resultant channel in the Data Portal immediately after the calculation but when I call this function through the menu and execute, the resultant channel does not appear immediately after the execution/calculation. But appears once the dialog is closed. My question is, how do I make the calculated channel to appear immediately after the calculation when I work calling the function from the menu. I tried using ODSAutoRefresh command but does not prove to work.


Can anyone help me quick!!!
Thanks in advance
0 Kudos
Message 1 of 7
(3,876 Views)
Hi,

I tried to reproduce the behavior that you are experiencing, but I was unable to. Basically, I wrote a script that adds a menu item that calls a SUD dialog. From this dialog you can execute a FFT, as a result the data portal now show 2 new channels (Frequency and Amplitude). Can you try to run the script attached and let me know if it works as expected?

Best Regards,

Alejandro del Castillo
Application Engineer (NI)
0 Kudos
Message 2 of 7
(3,876 Views)
Hi,

Thanks for your consideration and help.

Yeah your attachment works fine and gives the required result but I dont see the same with my script.
Can you let me know where I may be going wrong,Should it be while the creation of the menu? The vbs file for the creation of menu uses a recurssive function so that n-level of sub menu can be inserted. And for calculation I am using formulacalc function of diadem.
Please suggest me a solution.

Thanks,
0 Kudos
Message 3 of 7
(3,876 Views)
Have you tried to use my menu adder routine to add a call to your SUD dialog? This test can help us narrow down the issue to either the menu routine or the SUD dialog. If you are experiencing the same behavior with my menu routine, can you post your SUD dialog? (Please try to send me the minimal amount of code that causes this behavior)

Regards,

Alejandro del Castillo
Application Engineer (NI)
0 Kudos
Message 4 of 7
(3,876 Views)
I suppose I missed to tell you that the clicking on the menu calls a script file this script file inturn calls the dialog after making the check on the status of Diadem interaction. When I directly called the dialog from your menu it worked fine and the resultant channels were immeditely seen but when i called the script file from your menu the probelm came in. I guess diadem is unable to refresh untill the script file is closed. But it is important for us to have the initial script file. I am not able to find a solution to instantly refresh the data portal, kindly help us out with this at the earliest.

Thanks,
0 Kudos
Message 5 of 7
(3,876 Views)
I create a script that inside contains the call to suddlgshow. Then, on my menu adder function I am calling ScriptStart to execute the script that calls the dialog. The data portal is being refreshed without problems.

To be able to pinpoint the cause of the problem I really need you send me code that will expose this behavior. Or, you can also start from my example and start to add code until the behavior gets exposed.

Thanks,

Alejandro del Castillo
Application Engineer (NI)
0 Kudos
Message 6 of 7
(3,876 Views)
Yep, Thanks a lot. I set it right. I was using scriptinclude( ) rather than scriptstart(). This held me up from refreshing the DataPortal.

Thanks again.
0 Kudos
Message 7 of 7
(3,876 Views)