再程序运行完毕后怎么删除那个自动生成的dcl文件啊 (defun yxp-dcl() (setq f_dcl (open "gjx.dcl" "w")) (write-line "dcl_settings : default_dcl_settings { audit_level = 3; }" f_dcl) (write-line "gjx : dialog{label=\"程序选择\";" f_dcl) (write-line " :button{key=\"pee\";label=\"编辑多义线\";width=10;is_default=true;}" f_dcl) (write-line " :button{key=\"mii\";label=\"镜像\";width=4;}" f_dcl) (write-line " :button{key=\"cc\";label=\"拷贝\";width=4;}" f_dcl) (write-line " :button{key=\"cv\";label=\"连续拷贝\";width=8;}" f_dcl) (write-line " cancel_button;" f_dcl) (write-line "}" f_dcl) (write-line "" f_dcl) (close f_dcl)) (defun c:gjx () (yxp-dcl) (if (> (setq dcl_id (load_dialog "gjx")) 0) (progn (if (new_dialog "gjx" dcl_id) (progn (action_tile "pee" "(done_dialog 1)") (action_tile "mii" "(done_dialog 2)") (action_tile "cc" "(done_dialog 3)") (action_tile "cv" "(done_dialog 4)") (action_tile "cancel" "(done_dialog 0)") (setq re (start_dialog)) ) (alert "Unable to display dialog box") ) (unload_dialog dcl_id) ) (alert "Unable to load dialog box") ) (cond ((= re 1) (c:pee)) ((= re 2) (c:mii)) ((= re 3) (c:cc)) ((= re 4) (c:cv)) ) (princ) ) (defun C:pee()(command "pedit" "m" (ssget) "" "y" "j" "" "")) ;编辑多义线 (defun c:mii()(command "_.MIRROR" (ssget) "" PAUSE PAUSE "Y")) ;镜像 (defun c:cc() (command "COPY" )) ;复制 (defun c:cv () (setq rr (ssget)) (command "COPY" rr "" "m")) ;复制多个
|