(while
(if (= yx "N")
(progn
(initget "C Y K W H T")
(setq ob (getpoint "\n指定编号位置[编号初值(C)/引线(Y)/边框(K)/文字(W)/还原为默认设置(H)/退出(T)]:<编号之前请先将当前文字样式的文字高度项设为0>"))
(if (or (= ob "C") (= ob "Y") (= ob "T") (= ob "K") (= ob "W") (= ob "H") (= ob nil))
(progn
(if (= ob "C") (chuzhi))
(if (= ob "Y") (yinxian))
(if (= ob "K") (bkshezhi))
(if (= ob "W") (wenzi))
(if (= ob "H") (chushihua))
(if (= ob nil) (gaodu0))
(if (= ob "T") (exit))
)
(progn
(huitu o ob)
)
)
)
(progn
(initget "C Y K W H T")
(setq o (getpoint "\n指定标注位置[编号初值(C)/引线(Y)/边框(K)/文字(W)/还原为默认设置(H)/退出(T)]:<编号之前请先将当前文字样式的文字高度项设为0>"))
(if (or (= o "C") (= o "Y") (= o "T") (= o "K") (= o "W") (= o "H") (= o nil))
(progn
(if (= o "C") (chuzhi))
(if (= o "Y") (yinxian))
(if (= o "K") (bkshezhi))
(if (= o "W") (wenzi))
(if (= o "H") (chushihua))
(if (= o nil) (gaodu0))
(if (= o "T") (exit))
)
(progn
(initget 1)
(setq ob (getpoint o "\n指定编号位置:"))
(huitu o ob)
)
)
)
)
;编号文字宽与高
(defun tdaxiao(x / a b c) ;x=t则b=宽.x=nil则b=高
(setq a (textbox (list (cons 1 bh))))
(setq c (/ (- (cadar a) (cadadr a)) pianyi))
(if (= x 1)
(setq b (- (caadr a) (caar a) c))
(if (= x 2)
(setq b (- (cadadr a) (cadar a) c))
(setq b (- (distance (car a) (cadr a)) c))
)
)
(eval b)
)