本帖最后由 foolishzy 于 2023-6-5 10:51 编辑
- (defun c:tt(/ ss sslist flag vps mod key dert pickset_to_enamelist )
- (defun pickset_to_enamelist(pickset / ss sslst )
- (setq ss pickset sslst '())
- (while (setq n (ssname ss 0))
- (progn
- (setq sslst (append sslst (list n)))
- (ssdel n ss)
- )
- )
- sslst
- )
- (setq ss (ssget (list (cons 0 "DIMENSION"))))
- (setq sslist (pickset_to_enamelist ss))
- (setq flag t)
- (while flag
- (progn
- (setq
- vps (grread t 6 0)
- mod (car vps)
- dert 0
- )
- (princ "\n 放大/w,缩小/s:")
- (if (= 2 mod)
- (progn
- (setq key (cadr vps) )
- (cond
- ((or (= key 87)(= key 119))(setq dert 1))
- ((or (= key 115) (= key 83))(setq dert -1))
- )
- (foreach s sslist
- (progn
- (vlax-put-property
- (vlax-ename->vla-object s)
- 'TextHeight
- (+
- (vlax-get-property
- (vlax-ename->vla-object s)
- 'TextHeight
- )
- dert
- )
- )
- ))
- (redraw)
- )
- )
- )
- )
-
- )
|