 - (defun c:xh ( / os tx yq po pt ang cir cirdata )
- (setq os (getvar "osmode")) ;系统变量
- (setvar "cmdecho" 0) ;命令回显
- (setq tx (getint "\n 序号起始数字(1):"))
- (if (= tx nil)(setq tx 1))
- (setq yq (getdist "\n序号球直径(5):"))
- (if (= yq nil)(setq yq 5))
- (while (setq po (getpoint "\n引线起点:"))
- (command "line" po pause "")
- (setq pt (cadr (grread pause)))
- (setq ang (angle po pt))
- (command "circle" "2p" pt (polar pt ang yq))
- (setq cir entlast)
- (setq cirdata (cdr (assoc 10 (entget (cir)))))
- (command "text" "j" "m" cirdata "" "" tx)
- (setq tx (1+ tx))
- )
- (setvar "osmode" os)
- (princ)
- )
|