9 Replies Latest reply: Sep 17, 2012 10:51 PM by Harsh V Sharma RSS

    Problem while adding menu item

    Harsh V Sharma Community Member

      Hi All,


      I am working on a plugin for adobe illustrator CS6 by using adobe CS6 SDK. By using this plugin I need to add a Me nu Item In File Menu of Adobe Illustrator.

      I have used the following code for this:



      SPBasicSuite *mBasic = message->d.basic;

          AIMenuSuite *sAIMenu;

          mBasic->AcquireSuite(kAIMenuSuite,kAIMenuVersion, (const void**)&sAIMenu);

          SPPluginRef plugin;

          AIPlatformAddMenuItemDataUS menuData;

          AIPlatformAddMenuItemDataUS pluginMenuData;

          const char *menuGroupCStr = "MyGroup";

          const char *menuCStr = "Menu...";

          const char *pluginCStr = "MMMEEENNNUUU";

          menuData.groupName = kEditMenuGroup;

          menuData.itemText = ai::UnicodeString(menuCStr);

          pluginMenuData.groupName = menuGroupCStr;

          pluginMenuData.itemText = ai::UnicodeString(pluginCStr);

          const char *Key=NULL;

          AIMenuItemOption options=kMenuItemIsSeparator;

          //AIMenuItemHandle *menuItem;

          AIErr err = sAIMenu->AddMenuItem(message->d.self,NULL,&menuData,0,&g->showMenuIte m);

          if (error) goto error;




      But i have nothing as output. Can any of you please suggest me that what should i do in this code.