回复 pb.v@163.com 的帖子
- (defun c:GL2 ()
- (setq ss (ssget))
- (command "change" ss "" "p" "lt" "hidden" "")
- (setq pt (getpoint "\n请为调整比例指定一个点:[不调整] "))
- (if (/= pt nil)
- (sf pt ss)
- )
- )
- (defun sf (pt ss / alts gr s1 lt newscale)
- (vl-load-com)
- (setq alts (getvar "LTSCALE"))
- (while (= (car (setq gr (grread nil 5 0))) 5)
- (redraw)
- (grdraw (cadr gr) pt 1 1)
- (setq i -1)
- (while (setq s1 (ssname ss (setq i (1+ i))))
- (setq lt (cdr (assoc 6 (entget s1))))
- (setq zq (cdr (assoc 40 (tblsearch "ltype" lt))))
- (if (/= zq 0)
- (setq newscale (/ (distance (cadr gr) pt) zq alts 1.0))
- (setq newscale 1)
- )
- (vla-put-LinetypeScale (vlax-ename->vla-object s1) newscale)
- )
- )
- (redraw)
- (princ)
- )
|