天边 发表于 2005-1-27 23:33:00

请求指正

本人是一个初学者,请各位高手帮忙指正一下错误。。。谢谢。


(defun c:qd()<BR>                                               (setvar "cmdecho" 0)<BR>                                               (setq FirstPtAbscissa (getreal "第一点横坐标:"))<BR>                                               (setq FirstPtOrdinate (getreal "第二点纵坐标:"))<BR>                                               (setq FirstPt (list FirstPtAbscissa FirstPtOrdinate))<BR>                                               (setq DeltaAbscissa_1 (getreal "请输入盖梁长度:"))<BR>                                               (setq SecondPtAbscissa (+ FirstPtAbscissa DeltaAbscissa_1))<BR>                                               (setq SecondPtOrdinate (FirstPtOrdinate))<BR>                                               (setq SecondPt (list SecondPtAbscissa SecondPtOrdinate))<BR>                                               (command "line" FirstPt SecondPt)<BR>)


期待你的答复<IMG src="Skins/Default/emot/em01.gif" border=0>

xyp1964 发表于 2005-1-28 01:20:00

(defun c:test ()
   (setvar "cmdecho" 0)
   (setqleng (getreal "\n请输入盖梁长度 : ")
pt1   (getpoint "\n起点 : ")
Pt2   (list (+ (car pt1) leng) (cadr pt1))
   )
   (command "line" Pt1 Pt2 "")
   (princ)
)
页: [1]
查看完整版本: 请求指正