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 AcadPopupMenu Set menuItemHuamo = newMenu.AddSubMenu(newMenu.Count + 1, "滑动导向模座") '子菜单项目:对角导柱 Dim subMenuItemDuijiao As AcadPopupMenuItem Set subMenuItemDuijiao = menuItemHuamo.AddMenuItem(menuItemHuamo.Count + 1, "对角导柱", macro & "???")
End Sub
用这种方法加了一个菜单,??处该怎样写,还应该加什么语句才能实现,点击对角导柱后弹出一个名为YY的对话框? 想实现菜单和对话框的连接! 请帮帮! |