Autolisp有缺陷 (defun C:bezier3() (setq b0 (getpoint"\nEnter first point:")) (setq b1 (getpoint"\nS
2个回答
展开全部
你把 代码发全 好么?
你只是发了一般我们怎么帮你查看错误呢?
可能是你有的括号没有匹对
你只是发了一般我们怎么帮你查看错误呢?
可能是你有的括号没有匹对
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
(setq h (ureal 1 "" "\n文字高度:" 5))
如果循环的话需要 while 函数的
=========================================
(defun c:ZBB ()
(setq TEXT_H (getvar "USERR1"))
(setq REPLY (strcat "\nEnter text height <" (rtos TEXT_H 2 3) ">:"))
(setq T_H (getreal REPLY))
(if (/= T_H nil)
(setvar "USERR1" T_H)
(setq T_H TEXT_H)
)
(setvar "OSMODE" 32)
(setq p1 (getpoint "\nint-point:"))
(setvar "OSMODE" 0)
(setq n1 (nth 1 p1))
(setq e1 (nth 0 p1))
(setq nn (rtos n1 2 3))
(setq ee (rtos e1 2 3))
(setq nn (strcat "X_" nn))
(setq ee (STRCAT "Y_" ee))
(setq p2 (getpoint "\nsecond point:"))
(setq fw (angle p1 p2))
(setq fw1 (/ pi 2))
(setq fw2 (/ (* pi 3) 2))
(if (and (> fw fw1) (< fw fw2))
(progn
(setq pe (polar p2 (* pi -1) (* 7.5 T_H)))
(setq pt (polar pe 0 0))
)
;else------------------------
(progn
(setq pe (polar p2 0 (* 7.5 T_H)))
(setq pt (polar p2 0 T_H))
)
) ;end if----------------------------
(setq p3 (polar pt fw1 (* T_H 0.5)))
(COMMAND "text" p3 T_H "0" nn)
(setq p3 (polar pt fw2 (* T_H 1.5)))
(command "text" p3 T_H "0" ee)
(command "pline" p1 p2 pe "")
(setvar "osmode" 35)
(c:zbb)
)
这个可以循环的,就是每次都提示字高,你可以用两个程序:一个用来设置字高存入系统里,另一个直接读取系统已存的字高用来标注
如果循环的话需要 while 函数的
=========================================
(defun c:ZBB ()
(setq TEXT_H (getvar "USERR1"))
(setq REPLY (strcat "\nEnter text height <" (rtos TEXT_H 2 3) ">:"))
(setq T_H (getreal REPLY))
(if (/= T_H nil)
(setvar "USERR1" T_H)
(setq T_H TEXT_H)
)
(setvar "OSMODE" 32)
(setq p1 (getpoint "\nint-point:"))
(setvar "OSMODE" 0)
(setq n1 (nth 1 p1))
(setq e1 (nth 0 p1))
(setq nn (rtos n1 2 3))
(setq ee (rtos e1 2 3))
(setq nn (strcat "X_" nn))
(setq ee (STRCAT "Y_" ee))
(setq p2 (getpoint "\nsecond point:"))
(setq fw (angle p1 p2))
(setq fw1 (/ pi 2))
(setq fw2 (/ (* pi 3) 2))
(if (and (> fw fw1) (< fw fw2))
(progn
(setq pe (polar p2 (* pi -1) (* 7.5 T_H)))
(setq pt (polar pe 0 0))
)
;else------------------------
(progn
(setq pe (polar p2 0 (* 7.5 T_H)))
(setq pt (polar p2 0 T_H))
)
) ;end if----------------------------
(setq p3 (polar pt fw1 (* T_H 0.5)))
(COMMAND "text" p3 T_H "0" nn)
(setq p3 (polar pt fw2 (* T_H 1.5)))
(command "text" p3 T_H "0" ee)
(command "pline" p1 p2 pe "")
(setvar "osmode" 35)
(c:zbb)
)
这个可以循环的,就是每次都提示字高,你可以用两个程序:一个用来设置字高存入系统里,另一个直接读取系统已存的字高用来标注
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询