- ;;说明:批量修改标注线性比例
- (defun C:DLSF(/ ent lts n ss)
- (command "UNDO" "be")
- (if (= 0 (getvar "USERR2")) (progn (setq lts 1.0) (setvar "USERR2" lts)) (setq lts (getvar "USERR2")))
- (if (setq ss (ssget '((0 . "DIMENSION"))))
- (progn
- (if (setq lts (getreal (strcat "\n请输入标注线性比例<" (rtos lts 2 3) ">:"))) (setvar "USERR2" lts) (setq lts (getvar "USERR2")))
- (setq n -1)
- (while (setq ent (ssname ss (setq n (1+ n))))
- (vla-put-LinearScaleFactor (vlax-ename->vla-object ent) lts)
- )
- )
- )
- (command "UNDO" "e")
- (prin1)
- )
|