Using Lee's 'set dynamic block property value', run this code in a script:
(defun c:foo (/ s)
;; Set Dynamic Block Property Value - Lee Mac
;; Modifies the value of a Dynamic Block property (if present)
;; blk - [vla] VLA Dynamic Block Reference object
;; prp - [str] Dynamic Block property name (case-insensitive)
;; val - [any] New value for property
;; Returns: [any] New value if successful, else nil
(defun lm:setdynpropvalue (blk prp val)
(setq prp (strcase prp))
(vl-some
'(lambda (x)
(if (= prp (strcase (vla-get-propertyname x)))
(progn (vla-put-value x (vlax-make-variant val (vlax-variant-type (vla-get-value x))))
(cond (val)
(t)
)
)
)
)
(vlax-invoke blk 'getdynamicblockproperties)
)
)
(if (setq s (ssget "_X" '((0 . "INSERT") (2 . "PTA_STAMP_DYNAMIC,`*U*"))))
(foreach o (mapcar 'vlax-ename->vla-object (mapcar 'cadr (ssnamex s)))
(if (= "PTA_STAMP_DYNAMIC" (strcase (vla-get-effectivename o)))
(lm:setdynpropvalue o "Visibility1" "AS CONSTRUCTED")
)
)
)
(princ)
)