明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1400|回复: 2

请求帮助

[复制链接]
发表于 2005-3-9 23:11 | 显示全部楼层 |阅读模式
我抄了一个程序,怎么都运行不了,自已检查不出来,请求帮助,程序如下: (defun c:load_fl (/ dcl_id rd rj rx d x y cp n1 a a1 pt)
(setq dcl_id (load_dialog "c_fl.dcl"))
(if (not (new_dialog "c_fl" dcl_id))
(exit)
)
(action_tile "begin" "(data_manage)")
(start_dialog)
(unload_dialog dcl_id)
(princ)
(if (< rd rx)
(prompt "\n 内孔半径大于外圆半径")
((if (< rd rj)
(prompt "\n 节圆半径大于外圆半径")
((if (> rx rj)
(prompt "\n 节圆半径小于内圆半径")
((if (or (> (* 0.5 d) (- rd rj)) (> (* 0.5 d) (- rj rx)))
(prompt "\n 螺栓孔太大")
(draw1)
)
)
)
)
)
)
)
)
(defun data_manage ()
(setq x (atof (get_tile "cpx")))
(setq y (atof (get_tile "cpy")))
(setq cp (list x y))
(setq rd (atof (get_tile "wb")))
(setq rx (atof (get_tile "nb")))
(setq rj (atof (get_tile "jb")))
(setq d (atof (get_tile "kz")))
(setq n1 (atof (get_tile "ksh")))
(setq n (float n1))
(setq a1 (atof (get_tile "angle")))
(setq a (* pi (/ a1 180)))
(setq pt (polar cp a rj))
)
(defun draw1 ()
(command "circle" cp rd)
(command "circle" cp rx)
(command "circle" pt "D" d)
(command "array" "l" "" "p" cp n1 "" "y")
(command "layer" "m" 1 "c" 1 "" "")
(command "circle" cp rj)
(command "layer" "m" 0 "on" "" "")
)
发表于 2005-3-10 08:21 | 显示全部楼层
将c_fl.dcl文件放到搜索路径上。
 楼主| 发表于 2005-3-10 10:13 | 显示全部楼层
wdb:how are you.


为什么要放到autocad 下的suppot文件里?
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-6-29 11:52 , Processed in 0.147599 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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