Looking for a program that will change the text case in a attribute block. I know about TCASE but I need it to just change the text string that I pick on and not all of the text in the attribute.
Thanks,
CADD4LA
|
Looking for a program that will change the text case in a attribute block. I know about TCASE but I need it to just change the text string that I pick on and not all of the text in the attribute.
Thanks,
CADD4LA
That should do. command TCASEATT
(defun c:TCASEATT( / obj)
(while(setq obj(vlax-eName->vla-object(car(nentsel))))
(vla-put-TextString obj (strcase(vla-get-TextString obj))))
)
Sorry, the lisp don't work.
After I select the attribute block and hit enter I get this
; error: bad argument type: lentityp nil
Thanks,
Cadd4la
It's the same, but with more control...
Code:(vl-load-com) (defun c:TCASEATT( / js obj) (while (not (setq js (ssget "_+.:E:S:N" (list (cons 0 "INSERT") (cons 67 (if (eq (getvar "CVPORT") 2) 0 1)) (cons 410 (if (eq (getvar "CVPORT") 2) "Model" (getvar "CTAB"))) ) ) ) ) ) (setq obj (vlax-ename->vla-object (cadar (ssnamex js 0)))) (cond ((vlax-property-available-p obj 'TextString) (princ (strcat "\n" (vlax-get obj 'TextString) " -> " (strcase (vlax-get obj 'TextString)))) (vlax-put obj 'TextString (strcase (vlax-get obj 'TextString))) ) ) (princ "\nType REGEN to update") (prin1) )
Or sth like this, keep acet ui & functions ^^
Code:(defun c:tcasei (/ js) (acet-error-init (list '("cmdecho" 0) T)) (while (not (setq js (ssget "_+.:E:S:N" (list (cons 0 "INSERT")(cons 66 1))))) ) (acet-tcase (ssadd (cadar (ssnamex js 0))) (car(acet-tcase-ui-dlg))) (acet-error-restore) )
Can you attach a DWG with block with attributes