Sub AddASubMenu()
'获得当前的菜单组*********************** Dim currMenuGroup As AcadMenuGroup Set currMenuGroup = ThisDrawing.Application.MenuGroups.Item(0) '创建新菜单 Dim newMenu As AcadPopupMenu Set newMenu = currMenuGroup.Menus.Add("冲模") '添加菜单项***************************** Dim macro As String macro = Chr(vbKeyEscape) + Chr(vbKeyEscape) '模座 Dim menuItemHuamo As AcadPopupMenuItem Set menuItemHuamo = newMenu.AddMenuItem(newMenu.Count + 1, & "模座", macro & "?????")
'在菜单栏上显示菜单******************* newMenu.InsertInMenuBar (ThisDrawing.Application.MenuBar.Count + 1) End Sub
??处该怎样编写,窗体代码又该怎样写,才能使菜单和对话框连接起来呢?
有劳了!! |