*****必须要生成 cui文件吗? 用下面的代码不能实现吗? AcadApplication acadapp = Application.AcadApplication as AcadApplication; AcadPopupMenu myMenu = acadapp.MenuGroups.Item(0).Menus.Add("临时菜r单(&L)"); AcadPopupMenuItem myMenuItem; int i = 0; myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单1(&A)", ESC + "set\n"); myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单2(&A)", ESC + "opBefore\n"); myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单3(&A)", ESC + "check\n"); myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单4(&A)", ESC + "lstopl\n"); myMenuItem.Enable = false; myMenuItem.Label = "ddddddd"; myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单5(&A)", ESC + "ltopl\n"); myMenuItem = myMenu.AddMenuItem(++i, "临时子菜单6(&A)", ESC + "submit\n"); myMenu.InsertInMenuBar(acadapp.MenuBar.Count);
|