求助:DCL查看程序
用lsp查看DCL 的外观 回复 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) 本帖最后由 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)
从一本教材上看到 转来发一下 仅供参考....
(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)
) 回复 lincctw_ccl 的帖子
谢谢老大
还想问一下
怎么样才可以在自己的*,lsp文件中在添加用户自定义的内容阿 NMGLL 发表于 2011-4-9 05:33 static/image/common/back.gif
回复 lincctw_ccl 的帖子
谢谢老大
编辑修改 好像不太好用呀? 不是很好用的
页:
[1]