Site icon BLUE BYTE SYSTEMS INC.

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

Creating Submenus in SOLIDWORKS PDM


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. This approach is central to creating submenus in SOLIDWORKS PDM, ensuring a more professional and structured interface. As you add more commands, a cluttered context menu can quickly become overwhelming, so grouping related commands under a parent label keeps 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

poCmdMgr.AddCmd(15065, "ParentMenu\\ChildMenu", 43, string.Empty, string.Empty, -1, 0);

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:

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.

Exit mobile version