明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1246|回复: 1

怎么删除那个自动生成的dcl文件啊

[复制链接]
发表于 2008-5-13 21:49 | 显示全部楼层 |阅读模式

再程序运行完毕后怎么删除那个自动生成的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")) ;复制多个

"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2008-5-14 08:19 | 显示全部楼层
用(VL-FILE-DELETE “FILEPATH”),也可以编译到VLX中,而不需要生成DCL文件。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|CAD论坛|CAD教程|CAD下载|联系我们|关于明经|明经通道 ( 粤ICP备05003914号 )  
©2000-2023 明经通道 版权所有 本站代码,在未取得本站及作者授权的情况下,不得用于商业用途

GMT+8, 2024-5-10 08:48 , Processed in 0.132440 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

快速回复 返回顶部 返回列表