明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
12
返回列表 发新帖
楼主: bower

到底如何对话框中文本框动态付初值啊?我实在是没辙了!!!

  [复制链接]
发表于 2005-11-23 21:50:00 | 显示全部楼层
  1. (defun c:qudong_biaotilan()
  2. (setq mingcheng (if mingcheng mincheng "名称")
  3.        zhitu (if zhitu zhitu "制图"))
  4. (if (< (setq index (load_dialog "biaotilan.dcl")) 0) (exit))
  5. (if (not (new_dialog "biaotilan" index)) (exit))
  6. (set_tile "mingcheng" mingcheng)
  7. (set_tile "zhitu" zhitu)
  8. (action_tile "accept" "(readdata) (done_dialog 3)")
  9. (action_tile "cancel" "(done_dialog 4)")
  10. (action_tile "help" "(help)")
  11. (setq result (start_dialog))  
  12. (unload_dialog index)
  13. (if (= result 3) (progn
  14.   (load "biaotilan.lsp")
  15.   (set_tile "mingcheng" mingcheng);得到填入文本框中的值。
  16.   (set_tile "zhitu" zhitu)  ;得到填入文本框中的值。
  17.   (biaotilan mingcheng zhitu)
  18. ))
  19. (princ)
  20. )
  21. (defun readdata ()
  22. (setq zhitu (get_tile "zhitu")
  23.        mingcheng (get_tile "mingcheng"))
  24. )
发表于 2011-9-18 21:14:19 | 显示全部楼层
如果是全局变量,那另外一个lisp如果也有同名的全局变量的话会有冲突哈!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2025-6-9 19:44 , Processed in 0.157402 second(s), 19 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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