12-03-2007 12:10 PM
12-04-2007 09:30 AM
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
12-04-2007 09:46 AM
12-05-2007 11:34 AM
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
12-05-2007 01:45 PM
Brad,
I ran your new scripts and nothing happened. What did I do wrong.
Larry
12-05-2007 03:51 PM
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