@Hans_Knol hi,
Check this COLX command. block "wd_m" is auto selected.
at select objects: pick your title block (could be any name) only 1 pick to select one is allowed.
that's it, job done!
think of another way to hide a block like putting it in freeze layer cause it is very difficult to select yours and see the change.
One more thing if i may? a positive\constructive criticism:
when you start a thread try to be a little more detailed, describe the issue so we can understand from first read. consider we do not know what design you do and how your blocks looks. if possible give some text\visual examples and image with before and after. do not wait us to ask for sample drawing. if you do that, surly you'll get a quick solution it's for your own benefit - yes?! 😀
enjoy
Moshe
(vl-load-com)
(defun c:colx (/ _datatags LM:lst-str fetch_attributes_value ; local functions
ss0 ss1)
;; List to String - Lee Mac
;; Concatenates each string in a supplied list, separated by a given delimiter
;; lst - [lst] List of strings to concatenate
;; del - [str] Delimiter string to separate each item
(defun LM:lst->str ( lst del )
(if (cdr lst)
(strcat (car lst) del (LM:lst->str (cdr lst) del))
(car lst)
)
); LM:lst->str
(setq _datatags (lambda () (LM:lst->str (mapcar (function (lambda (n) (strcat "COL" (itoa n)))) '(1 2 3 4 5 6 7 8 9 10)) ",")))
(defun fetch_attributes_value ()
(vl-remove-if
'not
(mapcar
(function
(lambda (AcDbAttrib)
(if (wcmatch (strcase (vla-get-tagString AcDbAttrib)) (_datatags))
(vla-get-textString AcDbAttrib)
); if
); lambda
); function
(vlax-invoke (vlax-ename->vla-object (ssname ss1 0)) 'GetAttributes)
); mapcar
); vl-remove
); fetch_attributes_value
; here start c:colx
(if (and
(setq ss0 (ssget "_x" '((0 . "insert") (2 . "wd_m") (66 . 1))))
(setq ss1 (ssget ":s:e+." '((0 . "insert") (66 . 1))))
)
(setpropertyvalue (ssname ss0 0) "char_h" (LM:lst->str (fetch_attributes_value) ","))
); if
(princ)
); c:colx