rmm Posted March 3, 2011 Posted March 3, 2011 does anyone know of a way to substitute the contents of a text throughout the drawing easily? What I want to do is substitute all existing elevations in the drawing with the same contents, but enclosed in parentheses, so that: xxx.xx becomes (xxx.xx) Quote
CyberAngel Posted March 3, 2011 Posted March 3, 2011 I've done that very thing. Select the text you want to change. Use the Edit|Find command. For find text, put * (wild card). For replace, put (*) (parentheses around wild card). That's it. Quote
rmm Posted March 4, 2011 Author Posted March 4, 2011 this didn't work. when i use the find/replace function on say, 123.45, and doing as you said, the result i get is literally (*). it appears that it interprets the wildcard character as an asterisk Quote
SLW210 Posted March 4, 2011 Posted March 4, 2011 To do the entire drawing.... Edit>Find or _FIND on the command line. Quote
rmm Posted March 4, 2011 Author Posted March 4, 2011 i'm sorry. i haven't explained properly. in a drawing, there are many text strings containing a numerical value. i want to change all the text strings with a single command or series of commands (without having to individually change them one by one) so that the original values are retained, but the numbers (numeric text string) are now enclosed inside parentheses. for example: 123.45 becomes (123.45), 543.21 becomes (543.21), 234.56 becomes (234.56), etc. Quote
ReMark Posted March 4, 2011 Posted March 4, 2011 I expect you would have to use wildcards between the parenthesis. Not sure AutoCAD's FIND command can handle it. Quote
cadvision Posted March 16, 2011 Posted March 16, 2011 (edited) I have a very old lisp that I use for this. It is called addtxt.lsp and is for adding prefix & suffix to text strings. I used it as you want for doing wire numbers in schematics for the past 20 yrs (give or take) Think it was an old cadence magazine file ; TIP908.LSP : ADDTEXT.LSP Add Prefix/Suffix to Text (c)1993, Ron Feiro (defun C:ADDTEXT ( / pre suf sset n index el c old new d b2) (setq count 0) (setq pre (getstring 1 "\nEnter text prefix: ")) (setq suf (getstring 1 "\nEnter text suffix: ")) (princ "\nSelect TEXT to change.") (if (setq sset (ssget)) (progn (setq n (sslength sset)) (setq index 0) (repeat n (setq el (entget (ssname sset index))) (setq index (1+ index)) (if (= "TEXT" (cdr (assoc 0 el))) (progn (setq c (assoc 1 el) old (cdr c) new (strcat pre old suf) d (cons (car c) new) b2 (subst d c el) count (1+ count) );setq (entmod b2) );progn nil );if );repeat );progn (princ "\nNo entities were selected.") );if (princ (strcat "\n" (itoa count) " TEXT entities were processed.")) (princ) );defun C:ADDTEXT Edited October 27, 2011 by SLW210 ADDED TAGS!!! Quote
Squirltech Posted October 26, 2011 Posted October 26, 2011 AutoCAD used to have a command in the EXPRESS tools that was: Edit Any Text (ie. you could select MTEXT, TEXT and in multiple places in the current drawing) Once you selected all of the text to be edited, you hit ENTER and the command would go through each text entity, with the appropriate editor, in the order that you made your selection. This was available in ACAD 06 but I haven't seen it since. Does anyone know if it's still available or a suitable replacement? I just thought about this today and knew this would be the place to ask. I did a search of the forum but came up empty handed so I thought I'd bump this one. Let me know! Thanks. Quote
nicolea Posted October 31, 2011 Posted October 31, 2011 I also have this issue, but I just quit lastly. I will try some methods which seems feasible and hope find a suitable way for me. Quote
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.