DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Add a menu item in toolbar (save the config)

Hi everyone!
 
If I add a customized menu in the toolbar by using the code "MenuItemAdd", is there a possibilty to save the Diadem configuration
an have the new menu available everytime that Diadem is open ?
 
I tryed to save the *DDD file, however nothing happened. Everytime Diadem is closed, the menu automatically disapears. Also in the
Diadem shortcut in the desktop, I wrote in the target "C:\DIAdem8\DIADEM.exe /dDesktop /cScriptStart('Menu_toolbar')" without sucess.
The Autodriver path was set to find the script.
 
The script "Menu_toolbar" starts but the menu does not appear.
 
Any hint will be helpfull !
 
Thanks in advance
 
Rodrigo
Brazil
0 Kudos
Message 1 of 6
(4,580 Views)

Hello Rodrigo!

It's not possible to store the customized menu in the desktop file.

If you want to add it on startup you have to add a WndShow( <Device> ) for every device you want to change in DIAdem 8.1. In newer versions (>= 9.1) the bug is fixed.

Matthias

Matthias Alleweldt
Project Engineer / Projektingenieur
Twigeater?  
0 Kudos
Message 2 of 6
(4,570 Views)

Hi Rodrigo,

Matthias is absolutely correct.  I believe the WndShow() is not needed as of DIAdem 9.1.  In DIAdem 10.0 and DIAdem 10.1 there is an option to start a particular VBScript as DIAdem is started.  This can be selected in the General Settings dialog, and that information is indeed stored in the desktop file.  So with a new version of DIAdem, it would be possible to have the desktop automatically create your custom menu.

I know that in DIAdem 8.1 there is a file called "ScriptDefault.VBS stored in the \DIAdem..\AddInfo directory, and this might exist in DIAdem 8.0 as well.  This VBScript is started every time DIAdem is, and you can add commands to it.  This is how the "DirectoryMenu" application works which you can find on the NI-DIAdem support site.  I know that example works in DIAdem 8.1, but I dont think I ever tried it in DIAdem 8.0.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 3 of 6
(4,560 Views)
Hi Brad, Hi Matthias
 
Both solutions worked.
 
As a matter of fact I use 8.1 version and tryed the solution of the "ScriptDefault.VBS". I inserted the code "Call ScriptStart (C:\........VBS)
in the footer of the script and the customized menu appears everytime Diadem is open. However, when I select one of the scipts assigned in the menu, Diadem shuts down !!!
 
With the code I have inserted in the shortcut target "C:\DIAdem8\DIADEM.exe /dDesktop /cScriptStart('Menu_toolbar')" , in addition of the script missing code "Call WndShow("device")", suggested by Matthias, the function now works perfect.
 
Thanks a lot again
 
Rodrigo
Sao Paulo - Brazil
 
0 Kudos
Message 4 of 6
(4,555 Views)

Rodrigo,

I think you might benefit greatly from upgrading your DIAdem from version 8.1 to version 10.1, there are a lot of very nice new features that have been added in Version 9 and Version 10.

Please get in touch with the NI Brazil office if you're interested in obtaining an upgrade:

National Instruments Brasil
Avenida Paulista 509-18 andar/cj 1808
01311-910
São Paulo - SP
T: (11) 3262-3599
F: (11) 3266-5088
e-mail: ni.brazil@ni.com

Thank you for using DIAdem,

Otmar D. Foehner
0 Kudos
Message 5 of 6
(4,537 Views)
Hello Mr. Foehner
The TI dept. of the company that I work for is already in charge of this issue.
 
However, it still might take a reasonable time.
 
Thank you so much anyway.
 
Rodrigo
 
 
 
 
0 Kudos
Message 6 of 6
(4,523 Views)