明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1309|回复: 3

请ZZXXQQ斑竹再帮我解答一个问题,再次谢谢你了

[复制链接]
发表于 2007-6-8 12:52 | 显示全部楼层 |阅读模式
还是那段代码,我要每次循环把得到的数字都变成字符串行吗
(defun GetData44 ()
   (setq floor_height (get_tile "data"))
)

(if (> (setq dcl_id (load_dialog "support")) 0) (progn
   (setq n 1)
   (setq nn (atof (get_tile "floor")))
   (while (and (<= n nn) (= dlgans 1))
    (if (new_dialog "floor_height" dcl_id) (progn
     (set_tile "prompt1" (strcat "请输入第" (rtos n 2) "层高"))
     (action_tile "accept" "(GetData44) (done_dialog 1)")
     (action_tile "cancel" "(done_dialog 0)")
     (setq dlgans (start_dialog))
    )
    )
    (setq n (1+ n))
   )
   (unload_dialog dcl_id)
  )
  )
"觉得好,就打赏"
还没有人打赏,支持一下
发表于 2007-6-8 15:58 | 显示全部楼层

是不是该把

(setq nn (atof (get_tile "floor")))

改成

(setq nn (atoi (get_tile "floor")))

发表于 2007-6-8 18:33 | 显示全部楼层
  1. ;那就这样写。
  2. (defun GetData44 ()
  3. (setq floor_height (get_tile "data"))
  4. (SETQ FHLIST (APPEND FHLIST (LIST floor_height)))
  5. )
  6. (if (> (setq dcl_id (load_dialog "support")) 0) (progn
  7.   (setq n 1)
  8.   (SETQ FHLIST (LIST))
  9.   (setq nn (atof (get_tile "floor")))
  10.   (while (and (<= n nn) (= dlgans 1))
  11.    (if (new_dialog "floor_height" dcl_id) (progn
  12.     (set_tile "prompt1" (strcat "请输入第" (rtos n 2) "层高"))
  13.     (action_tile "accept" "(GetData44) (done_dialog 1)")
  14.     (action_tile "cancel" "(done_dialog 0)")
  15.     (setq dlgans (start_dialog))
  16.    ))
  17.    (setq n (1+ n))
  18.   )
  19.   (unload_dialog dcl_id)
  20. ))
 楼主| 发表于 2007-6-11 23:37 | 显示全部楼层
恩谢谢版主阿
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-5-19 06:32 , Processed in 0.186662 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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