;;文字(标注)内容刷子
(defun ea:put-property (obj plst /)
  (mapcar
    '(lambda (p)
       (if (eval p)
  (vl-catch-all-apply 'vlax-put-property (list obj p (eval p)))
       )
     )
    plst
  )
)
(defun c:text_brush_beyondutmost (/ count entname-from entname-to flag-from
        flag-to obj-from obj-to ss textoverride
        textstring
     )
  (vl-load-com)
  (setq entname-from (car (entsel "点取源对象：")))
  (setq flag-from (cdr (assoc 0 (entget entname-from))))
  (cond
    ((= flag-from "TEXT")
      (setq obj-from (vlax-ename->vla-object entname-from))
      (vlax-invoke-method obj-from 'Highlight T)
      (setq textstring (vlax-get-property obj-from "textstring"))
    )
    ((= flag-from "DIMENSION")
      (setq obj-from (vlax-ename->vla-object entname-from))
      (vlax-invoke-method obj-from 'Highlight T)
      (setq textstring (vlax-get-property obj-from "TextOverride"))
      (if (= textstring "")
(progn
   (setq textstring (rtos (cdr (assoc 42 (entget
       (vlax-vla-object->ename obj-from)
      )
          )
     ) 2 (vlax-get-property obj-from "PrimaryUnitsPrecision")
      )
   )
)
      )
    )
    ((= flag-from "MTEXT")
      (setq obj-from (vlax-ename->vla-object entname-from))
      (vlax-invoke-method obj-from 'Highlight T)
      (setq textstring (vlax-get-property obj-from "textstring"))
    )
  )
  (prompt "\n选择目标对象:")
  (setq ss (ssget '((-4 . "<or") (0 . "DIMENSION")
     (0 . "TEXT")
     (0 . "MTEXT")
     (-4 . "or>")
    )
    )
count 0
  )
  (repeat (sslength ss)
    (setq entname-to (ssname ss count))
    (setq flag-to (cdr (assoc 0 (entget entname-to))))
    (setq obj-to (vlax-ename->vla-object entname-to))
    (cond
      ((= flag-to "TEXT")
(ea:put-property obj-to (list 'textstring))
      )
      ((= flag-to "DIMENSION")
(setq TextOverride textstring)
(ea:put-property obj-to (list 'TextOverride))
      )
      ((= flag-to "MTEXT")
(ea:put-property obj-to (list 'textstring))
      )
    )
    (setq count (1+ count))
  )
  (vlax-invoke-method obj-from 'Update)
)
(princ "\n本程序作者: 超越极至 BY 老虎空间. 更多作品请访问:http://www.tigerspace.org")
(princ "\n本程序属老虎空间原创,转贴请注明出处、作者.")
(princ "\n程序启动命令:text_brush_beyondutmost")
(princ)
;;; (c:text_brush_beyondutmost)