Hi, I’m creating an add-in for DraftSight using the COM native C++ API, following the sample projects and the reference documentation.
In particular, after adding a ribbon tab for my add-in, a toolbar, and an entry in the classic menu bar successfully, I’m trying also to add a submenu to the ribbon system menu (to be clear, the menu attached to the DraftSight icon in the top-left corner). My goal is to create a submenu that groups the custom commands that I have defined in my add-in.
I succeeded into adding all the entries at top-level by calling the method IRibbonSystemMenu::InsertRibbonSystemMenuItem, but this is not what I want to achieve. In fact, if I add a submenu at top-level and then I try adding my commands to it, I get an empty menu, which unfortunately seems to be consistent with the calls to IRibbonSystemMenuItem::InsertRibbonSystemMenuItem returning failure and a null pointer to IRibbonSystemMenuItem. See the attached picture below for the result I get.
I’ve seen that the sample projects always create only top-level menu items, so they don’t provide the exact example of what I want to achieve.
I’ve also seen from the remarks in the reference documentation that “ribbon system menu items can be nested only one level deep”, which is exactly what I would like to achieve.
Remark: I get the same behavior also if I try and switch to creating a C# add-in.
I’m using Visual Studio 2022 as IDE, and I observed the above behavior both with DraftSight API 2022 SP2 and also 2024 SP4, on both Windows 10 and 11.
What am I missing or doing wrong?
