明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1329|回复: 7

求助:DCL查看程序

[复制链接]
发表于 2011-4-7 22:50 | 显示全部楼层 |阅读模式
用lsp查看DCL 的外观
发表于 2011-4-8 10:39 | 显示全部楼层
回复 NMGLL 的帖子

(defun c:vdcl()
(if (null dcl_pt)
     (setq dcl_pt '(-1 -1))
)
(setq dcl_file (getfiled "開啟 DCL 檔案" "" "DCL" 2))
(princ "DCL 檔案名=>")(princ dcl_file)
(setq dia_name (getstring "\nDialog 交談框名=>"))
(if (= dia_name "")
     (setq dia_name dcl_file)
)
(setq dcl_id (load_dialog dcl_file))
(new_dialog dia_name dcl_id)
    ;(action_tile "accept" "(setq dcl_pt (done_dialog 1))")
    ;(action_tile "cancel" "(done_dialog 0)")
(setq dd(start_dialog))
(princ "DD=")(prin1 dd)
(cond ((= dd 1)(princ "\n確定<OK>!!!"))
       ((= dd 0)(princ "\n取消<Cancel>!!!"))
)
(prin1)
)

(prompt "*****VIEWDCL 預覽交談框設計*******")
(prin1)
发表于 2011-4-8 10:40 | 显示全部楼层
本帖最后由 lincctw_ccl 于 2011-4-8 10:41 编辑

簡体版本

(defun c:vdcl()
(if (null dcl_pt)
     (setq dcl_pt '(-1 -1))
)
(setq dcl_file (getfiled "开启 DCL 档案" "" "DCL" 2))
(princ "DCL 文件名=>")(princ dcl_file)
(setq dia_name (getstring "\nDialog 交谈框名=>"))
(if (= dia_name "")
     (setq dia_name dcl_file)
)
(setq dcl_id (load_dialog dcl_file))
(new_dialog dia_name dcl_id)
    ;(action_tile "accept" "(setq dcl_pt (done_dialog 1))")
    ;(action_tile "cancel" "(done_dialog 0)")
(setq dd(start_dialog))
(princ "DD=")(prin1 dd)
(cond ((= dd 1)(princ "\n确定<OK>!!!"))
       ((= dd 0)(princ "\n取消<Cancel>!!!"))
)
(prin1)
)

(prompt "*****VIEWDCL 预览交谈框设计*******")
(prin1)
发表于 2011-4-9 00:19 | 显示全部楼层
从一本教材上看到 转来发一下 仅供参考....
(defun c:viewdcl()
   (if (null dcl_pt)
       (setq dcl_pt '(-1 -1))
   )
   (setq dcl_file (getfiled "打开DCL文件" "" "DCL" 2))
   (princ "DCL 文件名:")(princ dcl_file)
   (setq dia_name (getstring "\nDialog 对话框名:"))
   (if (= dia_name "")(exit))
   (setq dcl_id (load_dialog dcl_file))
   (new_dialog dia_name dcl_id)
   (action_tile "accept" "(setq dcl_pt (done_dialog 1))")
   (action_tile "cancel" "(done_dialog 0)")
   (setq dd(start_dialog))
   (cond ((= dd 1) (princ "\n确定<ok>!!!"))
         ((= dd 0) (princ "\n取消<cancel>!!!"))
   )
   (prin1)
   )
 楼主| 发表于 2011-4-9 05:33 | 显示全部楼层
回复 lincctw_ccl 的帖子

谢谢老大
还想问一下
怎么样才可以在自己的*,lsp文件中在添加用户自定义的内容阿
发表于 2011-4-9 10:20 | 显示全部楼层
NMGLL 发表于 2011-4-9 05:33
回复 lincctw_ccl 的帖子

谢谢老大

编辑修改
发表于 2011-4-14 11:54 | 显示全部楼层
好像不太好用呀?
发表于 2011-4-24 14:11 | 显示全部楼层
不是很好用的
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-18 12:32 , Processed in 0.497122 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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