US$0.00
0

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.

Author

Amen Jlili

Amen Jlili is the founder and technical director of Blue Byte Systems Inc., a software company in Vancouver, Canada, specializing in automating SOLIDWORKS and PDM. With over a decade of experience, he has authored several courses and open-source frameworks related to the SOLIDWORKS API. His leadership ensures that Blue Byte Systems prioritizes customer satisfaction and delivers high-quality software and CAD design solutions.
0
    0
    Your Cart
    Your cart is emptyReturn to Shop
    ×