[dcl1214]昌立 22:42:19
哪位高僧看看这个如何解决啊
[dcl1214]昌立 22:47:24
多级的
[dcl1214]昌立 22:48:31
[qqimg]201309/{AA389976-FF74-3A7C-60D3-4E6B98F1FBED}.jpg[/qqimg]
[qqimg]201309/{187C543B-6198-7197-85CC-9EB796545F40}.jpg[/qqimg]
[dcl1214]昌立 22:49:25
想动态添加右键菜单
[dcl1214]昌立 22:52:50
(vlax-for item (vla-get-menugroups (vlax-get-acad-object))
(if (= (strcase (vl-filename-base (getvar "menuname")))
(vla-get-name item)
)
(vlax-for menu (vla-get-menus item)
(if (= :vlax-true (vla-get-shortcutmenu menu))
(progn
(setq new-macro
"$M=$(if,$(!=,$(getvar,cmdactive),0),$P0=*,line )"
)
(setq new-macro1
"$M=$(if,$(!=,$(getvar,cmdactive),0),$P0=*,copy )"
)
(vla-addmenuitem menu 0 "画线(&L)" new-macro)
(vla-addmenuitem menu 1 "复制(&C)" new-macro1)
;;; (setq exist-shortcut t)
)
)
)
)
)
目前添加同级可以,下级就不知道如何操作了
要的就是lisp |