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 ")
这里写了个“打开”文件的菜单,你要做别的,改改部分代码即
全部回复(9 )
只看楼主 我来说两句求助关于用lisp调用VBA工程方法!
什么方法都试过了,都是提示未找到宏,到底是哪个环节出错了。请高手给个能用的例子,最好能使用流程,本人初学,
(defun c:text_hello()
(setvar "cmdecho" 0)
(command "-vbarun" "C:\test\Project.dvb!模块1.qa")
(setvar "cmdecho" 1)
(princ)
)
解决:把(command "-vbarun" "C:\test\Project.dvb!模块1.qa")
改为:
(command "_vbarun" "C:\test\Project.dvb!模块1.qa")
回复 举报
刚学VBA请教在VBA选择集中如何把锁定,冻结和关闭的对象过滤掉 ?
刚学VBA请教在VBA选择集中如何把锁定,冻结和关闭的对象过滤掉
回复 举报