明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1807|回复: 6

对话框通不过,各位看看什么问题

[复制链接]
发表于 2010-5-22 02:29:00 | 显示全部楼层 |阅读模式
DCL文件
  1. ww:dialog{label="水路管牙型号标注";
  2.     :text{label="水路管牙型号标注";alignment=centered;}
  3. :boxed_column{label="管牙尺寸";
  4. :row{
  5. :button{label="PT 1/8";KEY="w1";}
  6. :button{label="PT1/4";KEY="w2";}
  7. :button{label="PT 3/8";KEY="w3";}
  8. :button{label="PT 1/2";KEY="w4";}
  9. :button{label="PT 3/4";KEY="w5";}
  10. :button{label="PT 1";KEY="w6";}
  11. }
  12. :row{
  13. :button{label="NPT 1/8";KEY="w7";}
  14. :button{label="NPT 1/4";KEY="w8";}
  15. :button{label="NPT 3/8";KEY="w9";}
  16. :button{label="NPT 1/2";KEY="w10";}
  17. :button{label="NPT 3/4";KEY="w11";}
  18. :button{label="NPT 1";KEY="w12";}
  19. }
  20. }
  21. spacer_1;
  22. cancel_button;  
  23. }
LISP文件
  1. (defun c:ww(/ OLD_OS old_la dcl_id dd wt_size p1 p2 p3)
  2. (setvar "CMDECHO" 0)
  3. (setq old_la (getvar "clayer"))
  4. (setq old_os (getvar "osmode"))
  5. (setq dcl_id (load_dialog "ww"))
  6. (new_dialog "ww" dcl_id)
  7. (action_tile "w1" "(done_dialog 1)")
  8. (action_tile "w2" "(done_dialog 2)")
  9. (action_tile "w3" "(done_dialog 3)")
  10. (action_tile "w4" "(done_dialog 4)")
  11. (action_tile "w5" "(done_dialog 5)")
  12. (action_tile "w6" "(done_dialog 6)")
  13. (action_tile "w7" "(done_dialog 7)")
  14. (action_tile "W8" "(done_dialog 8)")
  15. (action_tile "W9" "(done_dialog 9)")
  16. (action_tile "W10" "(done_dialog 10)")
  17. (action_tile "W11" "(done_dialog 11)")
  18. (action_tile "W12" "(done_dialog 12)")
  19. (setq dd (start_dialog))
  20. (cond
  21. ((= DD 0)(exit))
  22. ((= dd 1) (setq wt_size "PT 1/8"))
  23. ((= dd 2) (setq wt_size "PT 1/4"))
  24. ((= dd 3) (setq wt_size "PT 3/8"))
  25. ((= dd 4) (setq wt_size "PT 1/2"))
  26. ((= dd 5) (setq wt_size "PT 3/4"))
  27. ((= dd 6) (setq wt_size "PT 1"))
  28. ((= dd 7) (setq wt_size "NPT 1/8"))
  29. ((= dd 8) (setq wt_size "NPT 1/4"))
  30. ((= dd 9) (setq wt_size "NPT 3/8"))
  31. ((= dd 10) (setq wt_size "NPT 1/2"))
  32. ((= dd 11) (setq wt_size "NPT 3/4"))
  33. ((= dd 12) (setq wt_size "NPT 1"))
  34. )
  35. (setq p1 (getpoint  "\nStart point:"))
  36. (setvar "osmode" 0)
  37. (command "ortho" "off")
  38. (setq p2 (getpoint p1 "\nTo point:"))
  39. (command "ortho" "on")
  40. (setq p3 (getpoint p2 "\nTo point:"))
  41. (setvar "clayer" "尺寸线层")
  42. (if (= p3 nil)
  43.     (command  "leader"   p1 p2  "" wt_size "")
  44.     (command  "leader"   p1 p2 p3 ""  wt_size "")     
  45. )
  46. (setvar "osmode" old_os)
  47. (setvar "clayer" old_la)
  48. (princ)
  49. )
各位帮忙指正一下
发表于 2010-5-22 10:50:00 | 显示全部楼层

1、把DCL文件中的 KEY 替换成小写 key

2、把LISP文件以下几行的大写字母“W”换成小写字母"w"替换

(action_tile "W8" "(done_dialog 8)")
(action_tile "W9" "(done_dialog 9)")
(action_tile "W10" "(done_dialog 10)")
(action_tile "W11" "(done_dialog 11)")
(action_tile "W12" "(done_dialog 12)")

 楼主| 发表于 2010-5-22 12:42:00 | 显示全部楼层
可以了,谢谢
发表于 2010-5-22 13:28:00 | 显示全部楼层
function XML() {
    [native code]
}
发表于 2010-6-7 17:09:00 | 显示全部楼层
没看懂
发表于 2010-6-8 00:42:00 | 显示全部楼层

对话框内置法:

 

本帖子中包含更多资源

您需要 登录 才可以下载或查看,没有账号?注册

x
 楼主| 发表于 2010-6-9 13:24:00 | 显示全部楼层

xyp1964楼主的程式加了内置函数(xyp-MkLaCo "尺寸线层" 3(xyp-Dcl-Init ilst "【水路管牙型号标注】" t)。直接加载通不过

您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-2 03:30 , Processed in 0.184511 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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