DIAdem

cancel
Showing results for 
Search instead for 
Did you mean: 

Create Menu 10.2

How do I create a toolbar menu in version 10.2.  My previous scripts do not work.
0 Kudos
Message 1 of 6
(4,495 Views)

Hi bm2cox,

Not much has changed in the Menu functions over the last several years-- about the only thing I can think of is that the panels were renamed from DIAdem 8.1 to DIAdem 9.0, and somewhere around there DIAdem stopped needing a panel to be officially opened before you could insert a menu into it.  Here's an example of installing 3 menus based on 3 scripts which reside in the same directory as the below script, which just creates the menu.  You can also configure the below script to run each time you start DIAdem.

ScriptPath1 = "Call ScriptStart(""" & AutoActPath & "Script1.VBS""")"
ScriptPath2 = "Call ScriptStart(""" & AutoActPath & "Script2.VBS""")"
ScriptPath3 = "Call ScriptStart(""" & AutoActPath & "Script3.VBS""")"
Call MenuItemInsert("VIEW", "7",   "POPUP",    "New Menu")
Call MenuItemInsert("VIEW", "7.1", "MENUITEM", "Option 1", ScriptPath1)
Call MenuItemInsert("VIEW", "7.2", "MENUITEM", "Option 2", ScriptPath2)
Call MenuItemInsert("VIEW", "7.3", "SEPARATOR", "", "")
Call MenuItemInsert("VIEW", "7.4", "MENUITEM", "Option 3", ScriptPath3)
Call WndShow("VIEW")

Ask if you have further questions,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 2 of 6
(4,482 Views)
Brad,
I have been using the attached scripts to create my menus. They have worked fine through version 10.1.  I upgraded to version 10.2.1 and these scripts no longer work.  Please advise.  These scripts have been great.
0 Kudos
Message 3 of 6
(4,477 Views)

Hi bm2cox,

The Favorites menus are a creation of mine, and I had to edit them when DIAdem 10.2 appeared.  DIAdem 10.2 was the first DIAdem version which is VISTA compliant, and part of that required DIAdem to move around many of its resource folders to support user directories and stuff.  One of these changes, the migration of the "ScriptDefault.VBS file",  tripped up the Favorites menus.  Here's an updated version which runs on DIAdem 10.2x.

Note that you will need to run the "Update DirectoryMenu Libs.VBS" script once in DIAdem in order to update the script libraries still stored in the "...\DIAdem 10.2\Addinfo\" directory.

Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 4 of 6
(4,441 Views)

Brad,

I ran your new scripts and nothing happened.  What did I do wrong.

 

Larry

0 Kudos
Message 5 of 6
(4,434 Views)

Hi Larry,

So first you run the "Update DirectoryMenu Libs.VBS" in order to replace the old script library files from the previous Favorites Menu, then you run the "Create DirectoryMenu.VBS" in order to install the new Favorites Menu.  You might need to open up the "...DIAdem\Examples\Doc\ScriptDefault.VBS" file and manually delete the Favorites Menu lines before running the "Create DirectoryMenu.VBS".

If you can't get it to work, you'd better call or me directly,
Brad Turpin
DIAdem Product Support Engineer
National Instruments

0 Kudos
Message 6 of 6
(4,428 Views)