明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1110|回复: 3

各位大哥,帮忙看程序,万分感激

[复制链接]
发表于 2005-5-11 10:10 | 显示全部楼层 |阅读模式
为什么对话框输入数据后不能划出所需要的图形,敬请高手帮忙看一下! 结果控制器出现提示错误:函数被取消
 楼主| 发表于 2005-5-11 10:17 | 显示全部楼层

本帖子中包含更多资源

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

x
 楼主| 发表于 2005-5-14 10:59 | 显示全部楼层
咋就没人会呢?俺是初学者,不要因为俺问题简单就不理俺吧
发表于 2005-5-14 12:04 | 显示全部楼层
  1. (defun c:load_fl (/ dcl_id jx y n1 n R r d a al rj)
  2.    (setq dcl_id (load_dialog "c_fl.dcl"))
  3.    (if (not (new_dialog "c_fl" dcl_id))
  4.        (exit)
  5.    )
  6.    (action_tile "begin" "(data_manage)")
  7.    (start_dialog)
  8.    (unload_dialog dcl_id)   
  9.    (if (< rd rx)
  10.        (prompt "\n内孔半径大于外圆半径")
  11.        (if  (< rd rj)
  12.            (prompt "\n节圆半径大于外圆半径")
  13.            (if (> rx rj)
  14.   (prompt "\n节圆半径小于内圆半径 ")
  15.   (if (or (> (* 0.5 d) (- rd rj)) (> (* 0.5 d) (- rj rx)))
  16.      (prompt "\螺栓孔太大 ")
  17.      (draw1)
  18.   )
  19.            )
  20.        )
  21.    )
  22.   (princ)
  23. )
  24. (defun data_manage ()
  25.    (setq x (atof (get_tile "cpx")))
  26.    (setq y (atof (get_tile "cpy")))
  27.    (setq cp (list x y))
  28.    (setq rd (atof (get_tile "wb")))
  29.    (setq rx (atof (get_tile "nb")))
  30.    (setq rj (atof (get_tile "jb")))
  31.    (setq d (atof (get_tile "kz")))
  32.    (setq n1 (atoi (get_tile "ksh")))
  33.    (setq n (float n1))
  34.    (setq a1 (atof (get_tile "angle")))
  35.    (setq a (* pi (/ a1 180)))
  36.    (setq pt (polar cp a rj))
  37. )
  38. (defun draw1 ()
  39.    (command "circle" cp rd)
  40.    (command "circle" cp rx)
  41.    (command "circle" pt "D" d)
  42.    (command "-array" "l" "" "p" cp n1 "" "y");_这儿是"l"不是"1"
  43.    (command "layer" "m" 1 "c" 1 "" "")
  44.    (command "circle" cp rj)
  45.    (command "layer" "m" 0 "on" "" "")
  46. )
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-1 19:26 , Processed in 0.158280 second(s), 26 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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