创建菜单栏这个简单的问题我替高手给你回答: Sub AddMenuItem()
Dim currMenuGroup As AcadMenuGroup Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0) 创建新菜单 Dim newMenu As AcadPopupMenu Set newMenu = currMenuGroup.Menus.Add("新菜单") 添加菜单内容 Dim newMenuItem As AcadPopupMenuItem Dim macro As String macro = Chr(vbKeyEscape) + Chr(vbKeyEscape) '相当于按下两次Esc键 Dim menuItemOpen As AcadPopupMenuItem Set menuItemOpen = newMenu.AddMenuItem(newMenu.Count + 1, "打开", macro & "_open ") 这里写了个“打开”文件的菜单,你要做别的,改改部分代码即 |