Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 05/29/2019 in all areas

  1. My bad. I was under the impression you had a better understanding of how to modify code to do what you want. Give below a try: (defun foo (/ _foo tag s w) ;; _FOO takes 3 arguments, a block a tag name and a width value (defun _foo (blk tag w) (foreach x (vlax-invoke blk 'getattributes) (and (vlax-write-enabled-p x) (= (strcase tag) (strcase (vla-get-tagstring x))) (= -1 (vlax-get x 'mtextattribute)) (vla-put-mtextboundarywidth x w) ) ) ) ;; Changed selection to _X to grab everything (if (setq s (ssget "_X" '((0 . "insert") (66 . 1)))) (foreach o (vl-remove-if 'listp (mapcar 'cadr (ssnamex s))) ;; Hardcoded values change to suit (_foo (vlax-ename->vla-object o) "YOURTAGHERE" 10) ) ) (princ) ) (foo)
    1 point
  2. As the OSMODE system variable is saved in the Registry, it will always be available when you start CAD. If it is on when you finish CAD, it will always be on when you next start CAD. Therefore something is happening to stop it. Perhaps an App is stopping it, or you are pressing some keys. It may be easier to find out WHY Osnap is turning off, because you are obviously having problems with the solutions proposed.
    1 point
×
×
  • Create New...