04-17-2015 06:31 PM
Hello!
I am running a batch file to open and execute a script in diadem using this command: start "" "C:\Program Files (x86)\National Instruments\DIAdem 2012\DIAdem.exe" "/CScriptStart('C:\Users\bseward\Documents\Diadem\tdms post process\SingleReport.VBS')"
My problem is that after the script finishes, diadem always changes the window back to the "view" panel. I have even added this command to the end of the script: "call WndOpen("REPORT")" with no luck. If I open diadem and then open the script and run it, it works as intended and finishes on the "Report" page. It seems that the VIew window is simply the default window upon initial open.
Is there any way for me to get around this so that I am actually seeing my report when the script is finishes?
Thanks a bunch!
Solved! Go to Solution.
04-18-2015 09:15 PM
Hello LetsDoThis,
Try:
call WndShow("Report","Maximize")
The command WndShow seems to be the one you're looking for. The help system will give more details on the parameters ...
04-20-2015 11:28 AM
Hello Otmar,
Thanks for the reply!
Unfortuntely that didnt work. Feel free to test this yourself by creating a script with just that command in it:
call Wndshow("REPORT","MAXIMIZE")
and running a batch file (simple text file with .BAT extension) to open Diadem with that script, which would be something like this:
start "" "C:\Program Files (x86)\National Instruments\DIAdem 2012\DIAdem.exe" "/CScriptStart('C:\Users\bseward\Documents\Diadem\MaximizeReport.VBS')"
and you will find that you will see diadem switch to the report tab, but then switch back to the view tab once the script is finished.
Let me know if you have any other ideas.
Thanks!
04-21-2015 07:34 AM - edited 04-21-2015 07:35 AM
Hi;
Have you try using the same script that Otmar recommended and configure DIAdem to run this script as a start up script? You can do this by going to Settings>>DIAdem Settings... in the General section there is an option called Start Script. There you can select the path to the script and after saving the configuration every time DIAdem starts up it will run the script. I've just test it on my machine and it works.
04-21-2015 02:37 PM
Hi LetsDoThis,
The default panel that DIAdem opens to is the NAVIGATOR panel. The only way to have DIAdem open to the VIEW panel is to program it to do so. How many lines is that script you're calling at DIAdem startup?
Brad Turpin
DIAdem Product Support Engineer
National Instruments
04-21-2015 03:54 PM
Hello,
Thanks for the responces everyone. I found that there was a default script running on startup which changed the view window to "view"
Thanks again!