public class class1 ' Dim acadapp As AcadApplication = Application.AcadApplication ' <CommandMethod("addmenu")> _ public sub addmenu () Dim mymenu As AcadPopupMenu = acadapp.MenuGroups.Item(0).Menus.Add("&Mymenu") 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 向CAD中加入自已的菜单,摸索了好多天。唉。。。。 在此拿出来供大家分享。