如何创建临时DCL
各位大神求一个LISP和DCL的和在一起的源码 然后如何创建临时DCL源码谢谢本帖最后由 cqu20104225 于 2020-5-30 15:44 编辑
(defun c:ttdcl ()
;临时dcl
(setq tempname (vl-filename-mktemp "temp.dcl") filen (open tempname "w"))
(foreach stream
'(
"dcl:dialog{";定义DCL
"\nlabel=\"总标题\";";总标题
"\n:button{label=\"按钮1\"; key=\"bb1\";}";按钮
"\n:button{label=\"按钮2\"; key=\"bb2\";}"
"\nok_cancel;}"
)
(princ stream filen)
)
(close filen)
(setq dclname tempname)
(setq dcl_id (load_dialog dclname));加载临时DCL
(if (not (new_dialog "dcl" dcl_id)) (exit))
(action_tile "bb1" "(done_dialog 1)");定义按钮1动作
(action_tile "bb2" "(done_dialog 2)");定义按钮2动作
(action_tile "accept" "(exit)");确认退出
(setq dd (start_dialog))
(unload_dialog dcl_id)
(vl-file-delete dclname);删除临时文件
(cond
((= dd 1) (tt1));tt1---命令1
((= dd 2) (tt2));tt1---命令2
(t (exit))
)
)
(defun tt1 ()
(alert "\n测试DCL")
)
(defun tt2 ()
(alert "\n测试DCL")
)
cqu20104225 发表于 2020-5-30 15:36
(defun c:ttdcl ()
;临时dcl
(setq tempname (vl-filename-mktemp "temp.dcl") filen (open tempname ...
谢谢 {:1_1:} cqu20104225 发表于 2020-5-30 15:36
(defun c:ttdcl ()
;临时dcl
(setq tempname (vl-filename-mktemp "temp.dcl") filen (open tempname ...
多谢大佬热心指导 cqu20104225 发表于 2020-5-30 15:36
(defun c:ttdcl ()
;临时dcl
(setq tempname (vl-filename-mktemp "temp.dcl") filen (open tempname ...
大佬,请问下,如何在你的这个里面加入日期显示 有点用,收藏了 谢谢分享!!!!
页:
[1]