How to Customize DIAdem Menus

Updated Aug 27, 2018

Reported In


  • DIAdem

Issue Details

I would like to customize the entries of DIAdem menus:
  • How can I add a new bar and fill it with items?
  • Is it possible to add an icon?


You can customize DIAdem by using the BarManager. Use the AddMenuBar method to add a new menu bar and the AddMenuItem method to fill it with entries.
This example code adds a new menu called "My Bar" to the SCRIPT group and inserts the item "Show Message Box". Also an icon will be set.

Dim oMyMenuBar
Dim oNewButton
Call BarManager.Reset 'Resets all BarManager changes
'Adds new Menu Bar to the Script Group
Set oMyMenuBar = BarManager.AddMenuBar("SCRMenuMain", "My Bar", 0)
'Inserts new Item which opens a massage box
Set oNewButton = BarManager.AddMenuItem(oMyMenuBar, "Show Message Box", "MsgBox(""Hello World"")", 0)
'adds an icon to the menu item. Icon must be placed in the ResourcePath of DIAdem. This path can be found calling BarManager.ResourcePath
oNewButton.Picture = "favicon.ico"

Additional Information

If you press <Ctrl-Shift> and idle the cursor on a bar element, DIAdem displays a tooltip with the name of the associated bar, the name of the bar element, and the name of the base object or base type. DIAdem also copies this information, separated by a space, to the clipboard.


Not Helpful