明经CAD社区

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1728|回复: 5

希望大家能帮忙解答,急需这个程序,谢谢

[复制链接]
发表于 2004-10-28 15:35:00 | 显示全部楼层 |阅读模式
下面这个程序为什么能够加载,在执行中总说函数错误,不能画出圆哪? ; ; ; this is user's autolisp program for drawing znnotation number.
; ; ; copyright reserved, not modification without permission by user. (defun c:yxy()
(setq p1(getpoint"\n 请指定标志线的起点:")
p2(getpoint"\n 请指定标注线第二点:")
)
(setvar "osmode" (logior (getvar "osmode") 16384)); 关辅捉
(command "circle" "p1" "1" )
(command "line" p1 p2 "@5<0" "")
(setq p3 (osnap p2 "midp"))
(command "text" "j" "bc" p3 5 0 )
(setvar "osmode" (logand (getvar "osmode") 49151));开辅捉
(princ)
)
 楼主| 发表于 2004-10-28 15:45:00 | 显示全部楼层
大家可以给点意见吗?谢谢
发表于 2004-10-28 16:05:00 | 显示全部楼层
;this is user's autolisp program for drawing znnotation number.
; copyright reserved, not modification without permission by user. (defun c:yxy()
(setq p1(getpoint"\n 请指定标志线的起点:")
p2(getpoint"\n 请指定标注线第二点:")
)
(setvar "osmode" (logior (getvar "osmode") 16384)); 关辅捉
(command "circle" p1 "1" ) ;错在这一行!
(command "line" p1 p2 "@5<0" "")
(setq p3 (osnap p2 "midp"))
(command "text" "j" "bc" p3 5 0 )
(setvar "osmode" (logand (getvar "osmode") 49151));开辅捉
(princ)
)
 楼主| 发表于 2004-10-28 21:38:00 | 显示全部楼层
l楼上的兄弟可以说明一下怎么改吗?
发表于 2004-10-28 22:44:00 | 显示全部楼层
(command "circle" "p1" "1" )改为(command "circle" p1 "1" )
估计是要标注说明,应该先写字,然后判断字的长度,在其下离开一定的距离画线,再指到引出之处,画线和加原点。还要考虑出图比例,否则半径为1的圆,1:100出图时只能用放大镜看了!
 楼主| 发表于 2004-10-28 22:56:00 | 显示全部楼层
还要考虑出图比例,否则半径为1的圆,1:100出图时只能用放大镜看了!


谢谢楼上兄的提醒,一定注意
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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

GMT+8, 2024-11-18 09:31 , Processed in 0.198741 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2021, Tencent Cloud.

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