Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: MathiasK on April 25, 2014, 07:23:55 pm

Title: EA Addin making more submenues?
Post by: MathiasK on April 25, 2014, 07:23:55 pm
Hi, i tryed to make more submenues (="menuNewWindo")- but they dont appear. The case of the menueNewWindow is never been executed.
Are there only two levls of menues and no futher menue allowed?



const string menuFirst_1 = "&First";
const string menuFirst_2 = "&First.2";

public object EA_GetMenuItems(EA.Repository Repository, string Location, string MenuName)
        {
 
            switch (MenuName)
            {
                // the brackels "" defines the top level menu option
                case "":

                    return menuHeader;
                // defines the submenu options

                case menuHeader:

                    string[] subMenus = { menuHello, menuGoodbye, menuNewWindow,"four" };
                    return subMenus;

                case menuNewWindow:

                    string[] names = { menuFirst_1, menuFirst_2};
                     return names;

            }

            return "";
        }
Title: Re: EA Addin making more submenues?
Post by: Geert Bellekens on April 25, 2014, 08:46:04 pm
I don't know. I've never tried to add more then two levels of menus.

Geert
Title: Re: EA Addin making more submenues?
Post by: MathiasK on April 25, 2014, 09:02:49 pm
i was just testing - probably dont want more menues too
- thanks anyway for the quick response :)