sicky111 发表于 2006-11-19 18:55:00

预览DCL对话框的LISP程式

<P>预览DCL对话框的LISP程式</P>
<P></P>
<P></P>

jj2098 发表于 2008-11-18 19:44:00

<p>(defun C:VIEWDCL (/ DCL_FILE DCL_ID DCL_PT DD DIA_NAME PRINC)</p><p>这一行中为什么要把PRINC放在局部变量中?我测试了一下,要把PRINC去掉才行<br/></p>

BDYCAD 发表于 2006-11-20 08:40:00

<P>测试了一下, 发现上传的代码有一点笔误, 改正如下</P>
<P>(defun C:VIEWDCL (/ DCL_FILE DCL_ID DCL_PT DD DIA_NAME PRINC)<BR>&nbsp; (if (null dcl_pt)<BR>&nbsp;&nbsp;&nbsp; (setq dcl_pt '(-1 -1))<BR>&nbsp; )<BR>&nbsp; (setq dcl_file (getfiled "打开DCL文件" "" "DCL" 2))<BR>&nbsp; (princ "DCL文件名:")<BR>&nbsp; (princ dcl_file)<BR>&nbsp; (setq dia_name (getstring "\nDialog对话框名:"))<BR>&nbsp; (if (= dia_name "")<BR>&nbsp;&nbsp;&nbsp; (exit)<BR>&nbsp; )<BR>&nbsp; (setq dcl_id (load_dialog dcl_file))<BR>&nbsp; (new_dialog dia_name dcl_id)<BR>&nbsp; (action_tile "accept" "(setq dcl_pt (done_dialog 1))")<BR>&nbsp; (action_tile "cancel" "(done_dialog 0)")<BR>&nbsp; (setq dd (start_dialog))<BR>&nbsp; (cond&nbsp;((= dd 1)<BR>&nbsp;(princ "\n确定&lt;OK&gt;!!!"))<BR>&nbsp; ((= dd 0))<BR>&nbsp; (princ "\n取消&lt;cancel&gt;!!!")<BR>)<BR>(prin1))</P>
<P>LISP 编辑本身有DCL的预览功能, 如下图所示</P>
<P>&nbsp;</P>

qianglcq 发表于 2007-1-5 23:59:00

下载看看,真的好用

donggs 发表于 2007-8-3 07:11:00

我也来学习一下!

wiuu 发表于 2008-8-30 19:53:00

还是开始那个好用!谢谢!!

skyshine 发表于 2008-12-25 09:44:00

好东西,正在找呢,感谢中!

yjtdkj 发表于 2021-6-3 19:27:27

BDYCAD 发表于 2006-11-20 08:40
测试了一下, 发现上传的代码有一点笔误, 改正如下
(defun C:VIEWDCL (/ DCL_FILE DCL_ID DCL_PT DD DIA_NAM ...

为什么中文版CAD中没有这个功能,难道英文版专用?
页: [1]
查看完整版本: 预览DCL对话框的LISP程式