用VB.net在CAD下动态加载菜单 public class class1 ' Dim acadapp As AcadApplication = Application.AcadApplication
Dim mymenu As AcadPopupMenu = acadapp.MenuGroups.Item(0).Menus.Add("&Mymenu") ' <CommandMethod("addmenu")> _ public sub addmenu () dim m1 as AcadPopupMenuItem = mymenu.AddMenuItem(0, "&Line", "line ") mymenu.AddSeparator(1) dim m2 As AcadPopupMenu = mymenu.AddSubMenu(2, "&Submenu") dim m3 as AcadPopupMenuItem = m2.AddMenuItem(3, "&Circle", "circle ") dim m4 as AcadPopupMenuItem = m2.AddMenuItem(4, "&Arc", "arc ") mymenu.InsertInMenuBar(12) end sub end class