(defun C:MAA(/ attas attbs enta entb obja objb)
(if (and (setq entb (entsel "\n请选择所要提取块属性内容的块:")) (setq enta (entsel "\n请选择需要更改块属性内容的块:")))
(progn
(setq objb (vlax-ename->vla-object (car entb)) attbs (vlax-safearray->list (vlax-variant-value (vla-getattributes objb))) obja (vlax-ename->vla-object (car enta)) attas (vlax-safearray->list (vlax-variant-value (vla-getattributes obja))))
(foreach attb attbs
(foreach atta attas
(if (equal (vla-get-TagString atta) (vla-get-TagString attb))
(progn
(vla-put-TextString atta (vla-get-TextString attb))
(vla-put-ScaleFactor atta (vla-get-ScaleFactor attb))
)
)
)
)
)
)
(prin1)
)
(princ "\n单层块属性刷《 快捷命令: MAA 》")
(prin1)