SOLIDWORKS PDM TIP: Creating Submenus in SOLIDWORKS PDM with IEdmCmdMgr5::AddCmd


If you’re developing custom add-ins or commands for SOLIDWORKS PDM, you may want to improve the user experience by organizing your commands into submenus. Fortunately, this is entirely possible using the IEdmCmdMgr5::AddCmd method. As you add more commands, a cluttered context menu can quickly become overwhelming. Creating submenus allows you to group related commands under a parent label, keeping the interface clean and intuitive.

How to Create a Submenu

To create a submenu, use the double backslash (\\ in C# if not escaped) separator in the menu name when registering your command with AddCmd.

Example

This code registers a new command under: Right-click > ParentMenu > ChildMenu

Important Notes

  1. Context Menu Only
    Submenus created this way will only appear in the right-click (context menu) in Windows File Explorer.
  2. No Modification of Built-In Menus
    You cannot add your submenu to any of SOLIDWORKS PDM’s existing menus or built-in add-ins. This technique is reserved strictly for custom commands.
  3. Use submenus to:
    • Group related automation tools
    • Separate user vs admin functions
    • Clean up large sets of utility commands

Need help building PDM tools or structuring your add-ins? Reach out to Blue Byte Systems Inc. — we specialize in SOLIDWORKS PDM automation and custom development.