明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1442|回复: 6

[讨论] 代码问题

[复制链接]
发表于 2010-4-20 08:28:00 | 显示全部楼层 |阅读模式

本帖子中包含更多资源

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

x
 楼主| 发表于 2010-4-20 08:31:00 | 显示全部楼层
请大家帮小妹检查代码的问题,我找不出原因,让大家见笑了!
发表于 2010-4-20 09:37:00 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
 楼主| 发表于 2010-4-20 16:29:00 | 显示全部楼层

怎么没人帮帮我呀

发表于 2010-4-20 18:01:00 | 显示全部楼层

(defun oweight(/ a b c d e);
      (setq a  (atof (get_tile "s_out")));
      (setq b  (atof (get_tile "s_in")));
      (setq c  (atof (get_tile "gear_list1")));
      (setq d  (atof (get_tile "gear_list2")));
      (setq e  (- a b ));
      (set_tile "show" (rtos e 2 2));
      (set_tile "show" $value);
)

缺少(massprop)函数。由于不是机械专业,怕搞错,也就不搞了。

发表于 2010-4-20 20:32:00 | 显示全部楼层
改动部分:
  1. (defun c:kg (/ sdt id a b c d e f DWGPATH PT)
  2. (setq id (load_dialog "C:\\Program Files\\AutoCAD 2004\\AutoCAD(钣金)二次开发\\二次开发命令\\lisp\\kg.dcl"))
  3. (if (< id 0) (exit))
  4. (if (not (new_dialog "kg" id)) (exit))
  5.    (action_tile "pick1" "(massprop)")
  6.    (action_tile "pick2" "(massprop)")
  7.    (action_tile "weight" "(oweight)")
  8.    (action_tile "goout" "(ogoout)")
  9.    (action_tile "cancel" "(done_dialog 0)")
  10.    (start_dialog)
  11.    (unload_dialog id)
  12.    (princ)
  13. )
  14. (defun oweight(/ a b c d e)
  15. (setq a (atof (get_tile "s_out")))
  16. (setq b (atof (get_tile "s_in")))
  17. (setq c (atof (get_tile "gear_list1")))
  18. (setq d (atof (get_tile "gear_list2")))
  19. (setq e (- a b))
  20. (set_tile "show" (rtos e 2 3))
  21. )
 楼主| 发表于 2010-4-21 10:39:00 | 显示全部楼层
太感谢大家了!
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-10-2 01:33 , Processed in 0.180710 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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