这或许是你要的,可自行再完善它 - (defun c:test()
- (setq txth (getvar "textsize"))
- (setq dfc (getvar "dimlfac"))
- (setq p1 (getpoint "\nFirst point:"))
- (setq p2 (getpoint p1 "\nSecond point:"))
- (setq len (distance p1 p2))
- (setq pt (mapcar '+ p1 p2))
- (setq pt (list (/ (car pt) 2)(/ (cadr pt) 2)))
- (command "text" pt txth 90 (rtos (* len dfc) 2 3))
- )
|