本帖最后由 1993063 于 2012-7-21 05:30 编辑
- (DEFUN C:TH (/ SSET I TXTHEIGHT TEXTSIZE) (VL-LOAD-COM) (SETQ I 0)
- (SETQ SSET (SSGET ":s" '((-4 . "<OR") (0 . "MTEXT") (0 . "TEXT") (-4 . "OR>"))))
- (IF SSET
- (PROGN
- (SETQ TEXTSIZE (* (GETVAR "DIMTXT") (GETVAR "DIMSCALE")))
- (SETQ TXTHEIGHT (GETDIST (STRCAT "\n指定文字的高度 字高:<< " (RTOS TEXTSIZE) " >> ")))
- (IF (= TXTHEIGHT NIL)(SETQ TXTHEIGHT TEXTSIZE))
- (REPEAT (SSLENGTH SSET)
- (VLA-PUT-HEIGHT (VLAX-ENAME->VLA-OBJECT (SSNAME SSET I)) TXTHEIGHT)
- (SETQ I (1+ I))
- )
- )
- )(if (= nil sset)(princ"\n*没选择文字*"))
- (PRINC)
- ) ;改字高到当前标注文字高度
|