Adding customized pull down menus to DIAdemPrimary Software: DIAdemPrimary Software Version: 8.00 Primary Software Fixed Version: N/A Secondary Software: N/A
Problem: How can I modify the existing, or add my own pull down menus in DIAdem? Solution: New to DIAdem 8.0 is the ability to modify or add your own pull down menus to the DIAdem user interface. There are 5 new VBS commands available: MenuItemAdd, MenuItemInsert, MenuItemDel, MenuItemChange, & MenuReset Having the ability to add or modify the pull down menus can add flexibility to a DIAdem based analysis solution. The attached example will add a new pull down menu in DIAdem CALC called “Custom Func”, with the associated menu items “Function 1”, “Function 2”, “Plot 1 & 2” and “Calc 1 & 2”. There are two files associated with example, the first file, “AddMenu.VBS”, contains the code that will modify menus, while “MenuHandle.VBS” interprets what to do when a menu item has been selected. Looking at a line of code in AddMenu.VBS: Call MenuItemInsert("CALC","11"+".1","MENUITEM","Function 1","call scriptstart(""MenuHandle"",""func1"")") The MenuItemInsert command is going to insert a menu in DIAdem CALC in the 11th position. When the user selects this menu item it will run the command scriptstart which in turn runs the subroutine, “func1” in the file “MenuHandle.vbs” Only run the the AddMenu.VBS once, if you make changes to the file and wish to run it a second time you first need to run the following single line script Call menureset Additional information can be found in the DIAdem Help file, search under “Menu” CODE in AddMenu.VBS CODE for MenuHandle.VBS Related Links: Attachments:
Report Date: 07/09/2002 Last Updated: 12/05/2004 Document ID: 2N8CPNZL |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
