tomtenberge Posted March 18, 2013 Share Posted March 18, 2013 good day to you all i been looking high and low for this, but i can't figure it out. i have made a block, wich include text as attributes (so they can be changed). and now i would like to add a piece of text to it, in a special font to make it a barcode, but i need to take the value of a atribute and add astrixes (*) before and behind it, do any of you know how to do it, without making a whole lisp routine? (i am no good at lisp). *edit* i am using Autocad 2010 Quote Link to comment Share on other sites More sharing options...
BIGAL Posted March 19, 2013 Share Posted March 19, 2013 Search here first 1st for "add text" to front of existing text likewise at end. 2nd search for any of the attribute update programs. 3rd you have to join them together. If you only want a pick one block pretty easy not tested (vl-load-com) (setq ss1 (car (entsel "\n pick block" ))) (foreach att (vlax-invoke (vlax-ename->vla-object SS1) 'getattributes) (setq newstr (vla-get-textstring att )) (princ (strcat "\n" newstr)) (setq ans (Getstring "\n Is this correct attribute press <Cr. for no")) (if (= ans nil) (princ) (progn (setq newstrblank (strcat "*" newstr "*")) (vla-put-textstring att newstrblank) (exit) ) ) ) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.