Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 06/04/2024 in all areas

  1. 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) )
    1 point
  2. You may also want to look into PEDITACCEPT. If PEDITACCEPT is set to one this function will fail. Maybe you should get the old value of PEDITACCEPT then set it to zero and at the end set it back to the old PEDITACCEPT. The same way you do it with CMDECHO.
    1 point
×
×
  • Create New...