峰峰兒 发表于 2014-8-16 07:51
菜單如何使用 ????????
问:菜單如何使用 ????????
答:加载进CAD去用。调用命令tt
问:怎么加入自己的命令呢???
答:打开lsp文件,修改这段- (setq lst '(
- (("直线" . "LINE")("PL线" . "pline")("弧" . "ARC")("园" . "circle")("椭圆" . "ellipse")("多行文字" . "mtext")("单行文字" . "TEXT"))
- (("菜单2-1" . "")("菜单2-2" . "")("菜单2-3" . "")("菜单2-4" . "")("菜单2-5" . "")("菜单2-6" . "")("菜单2-7" . ""))
- (("菜单3-1" . "")("菜单3-2" . "")("菜单3-3" . "")("菜单3-4" . "")("菜单3-5" . "")("菜单3-6" . "")("菜单3-7" . ""))
- (("菜单4-1" . "")("菜单4-2" . "")("菜单4-3" . "")("菜单4-4" . "")("菜单4-5" . "")("菜单4-6" . "")("菜单4-7" . ""))
- (("菜单5-1" . "")("菜单5-2" . "")("菜单5-3" . "")("菜单5-4" . "")("菜单5-5" . "")("菜单5-6" . "")("菜单5-7" . ""))
- (("菜单6-1" . "")("菜单6-2" . "")("菜单6-3" . "")("菜单6-4" . "")("菜单6-5" . "")("菜单6-6" . "")("菜单6-7" . ""))
- (("菜单7-1" . "")("菜单7-2" . "")("菜单7-3" . "")("菜单7-4" . "")("菜单7-5" . "")("菜单7-6" . "")("菜单7-7" . ""))
- (("菜单8-1" . "")("菜单8-2" . "")("菜单8-3" . "")("菜单8-4" . "")("菜单8-5" . "")("菜单8-6" . "")("菜单8-7" . ""))
- ))
上面是个例子,如果是要链接到你的插件命令,修改defun c:MENU_MenuForm_ListBox1_OnSelChanged为- (defun c:MENU_MenuForm_ListBox1_OnSelChanged (ItemIndexOrCount Value / sel todo)
- (setq Sel (nth (dcl_ListBox_GetCurSel MENU_MenuForm_ListBox1) lst1)
- todo (strcat (cdr sel) " ")
- )
- (dcl_sendstring todo)
- )
|