明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1572|回复: 2

【求助】隐藏对话框不能返回。。。

[复制链接]
发表于 2011-9-9 16:21:32 | 显示全部楼层 |阅读模式
做了1个小程序,本意是可以直接输入图层名,也可以点选图元确定图层名。
对话框能隐藏但不能返回了,请帮忙看看哪里错了?

(defun c:jxtc (/ dcl_id wn)
    (setq fn (open "d:/Backup/cad/jxtc1.txt" "r"))
    (setq l_ywbz (read-line fn)
          l_jzbz (read-line fn)
          l_lxtc (read-line fn)
    )
    (close fn)
    (if (and (not dcl_id)
        (< (setq dcl_id (load_dialog "jxtc1.dcl")) 0)
        )
        (exit)
    )
    (if (not (new_dialog "jxtc1" dcl_id))
        (exit)
    )
    (setq wn 2)
   (while (>= wn 2)
    (set_tile "edit1" l_ywbz)
    (set_tile "edit2" l_jzbz)
    (set_tile "edit3" l_lxtc)
    (action_tile "edit1" "(setq l_ywbz $value)")
    (action_tile "edit2" "(setq l_jzbz $value)")
    (action_tile "edit3" "(setq l_lxtc $value)")
    (action_tile "pick1" "(done_dialog 4)")
    (action_tile "accept" "(done_dialog 1)")
    (action_tile "cancel" "(done_dialog 0)(exit)")
    (setq wn (start_dialog))
    (cond
       ((= wn 4)
        (dxtc)
       )
    )
   )
    (unload_dialog dcl_id)
    (setq fn (open "d:/Backup/cad/jxtc1.txt" "w"))
    (write-line l_ywbz fn)
    (write-line l_jzbz fn)
    (write-line l_lxtc fn)
    (close fn)
)

(defun dxtc (/ l_ent)
    (setq l_ent (entsel))
    (setq l_ywbz (cdr (assoc 8 (entget (car l_ent)))))
    (set_tile "edit1" l_ywbz)
)

发表于 2011-9-9 17:06:40 | 显示全部楼层
 楼主| 发表于 2011-9-9 19:30:45 | 显示全部楼层
知道了,new_dialog 位置错了,谢谢!!!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-9-24 09:09 , Processed in 0.160491 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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