EBDN - Community - Question & Answers

  Friday, 23 February 2018
  3 Replies
  1.4K Visits
0
Votes
Undo
Hi,
I successfully added menu item with the following c# fragment:

UserInterface ui = myApplication.UserInterface;
Menu mn = ui.Menu;
mn.AddMacro("Assembly_name.PlugInName", MenuType.ContextOnly);
mn.Store();

Menu appears as expected (Only PlugInName is shown).

I tried to remove menu with

UserInterface ui = myApplication.UserInterface;
Menu mn = ui.Menu;
mn.RemoveMacro("Assembly_name.PlugInName", MenuType.ContextOnly);
mn.Store();

but menu still appears.

What I am doing wrong?