新手求助!
求助论坛老师帮完善这个简单的程序,谢谢!
- (defun c:test()
- ;;添加完善此程序
- (princ)
- )
- (defun make-dcl (/ lst_str str file f)
- (setq lst_str '(
- "temp:dialog "
- "{label=\"对话框测试\" ; "
- " :boxed_column { label = \"test\" ;"
- " :column {"
- " :row {"
- " :button { key = \"t1\" ;label = \"test1\" ;width = 15 ; }" ;; 想让此按钮打开系统计算器,此对话框不退出
- " :button { key = \"t2\" ;label = \"test2\" ;width = 15 ; }}";; 想让此按钮CAD命令“line”,执行后退出此对话框
- " :column {"
- " :row {"
- " :button { key = \"t3\" ;label = \"test3\" ;width = 15 ; }" ;; 想让此按钮调用自定命令“tt”,执行后退出此对话框
- " :button { key = \"t4\" ;label = \"test4\" ;width = 15 ; }}}}}";;想让此按钮打开网站"bbs.mjtd.com",此对话框不退出
- "ok_cancel;"
- "}"
- )
- )
- (setq file (vl-filename-mktemp "temp3.dcl"))
- (setq f (open file "w"))
- (foreach str lst_str
- (princ "\n" f)
- (princ str f)
- )
- (close f)
- ;;返回
- file
- )
|