(defun c:ko
-addmyblock
() (setq blkname
"MyBlock") ;name of my block (setq attrname
"NR") ;block attribute name (TagString) that I want to change (setq newattrvalue
"MyNewValue") ;the new value I want to give to the attribute (setq propname
"Width") ;block property name that is supposed to change depending on width of the attribute (setq pt
(getpoint "Insertion point for block")) ;get insertion point for the block
;;get the relevant attribute as vla-object
);vl-member-if
);car
);setq
;;get the relevant property as vla-object
);vl-member-if
);car
);setq
(vla-put-value propobj (+ 2.0 attrwidth)) ;change it's value
);defun