- (defun getatts(blk);|获取块参照图元(对象)的属性参照,返回值((属性标记 属性值 属性对象)...)以便进一步修改指定标记的属性值|;
- (if(equal(VL-CATCH-ALL-APPLY'vlax-get-property(list(setq blk(if(=(type blk)'ename)(vlax-ename->vla-object blk)blk))'HasAttributes)):vlax-true)
- (mapcar(function(lambda(x)(list(strcase(vlax-get-property'TagString))(vlax-get-property x'TextString)x)))
- (vlax-safearray->list(vlax-variant-value(vlax-invoke-method blk'GetAttributes))))))
- (defun putatts(enblk lst / a);|enblk属性块图元或对象,lst((标记 值)(标记 值)(标记 值)...)|;
- (and(setq a(getatts enblk))
- (vl-some(function(lambda(x / b)(and(setq b(assoc(strcase(car x))a))(vlax-put-property(caddr b)'TextString(cadr x)))))lst)))
|