这是我编的一段代码,实现在cad下添加一个菜单项,目的是使layerclect窗体现实 但是运行不了, 红色部分肯定是有错误 但不知道怎么改 求高手指点一下下啊~~ Sub insertMenu() 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 jianyan As String jianyan = "layerclect.Show" Set newMenuItem = newMenu.AddMenuItem(newMenu.Count + 1, "封闭性检验", layerclect.Show) currMenuGroup.Menus.InsertMenuInMenuBar "宗地检验", "" End Sub
|