gil9166 Posted July 31, 2009 Share Posted July 31, 2009 I just want to replace the attribute or text using find and replace command. example: FINDthis numbers 1, 2, 3, 4, 5,... and RELACE it by P1, P2, P3, P4, P5..., like adding letters on each separate number. Cause I use to change them one at a time, these are note numbers inside a block or sometimes like a buble grid. thanks, gil Quote Link to comment Share on other sites More sharing options...
dbroada Posted August 1, 2009 Share Posted August 1, 2009 if I'm reading your request correctly this is not easy. If you were to use the FIND & REPLACE function to change 1 to P1 that would change 11 to P1P1, not what you want. I think your best approach would be a LISP that prefixes every selected text with P. You will either have to select each item but that is still easier than doing by hand. If some guidance doesn't arrive here soon request help in the LISP section. Just adding a request to an old thread doesn't always get picked up - it looks like it has already been answered. also look below for other threads - this may already have been answered Quote Link to comment Share on other sites More sharing options...
Lee Mac Posted August 2, 2009 Share Posted August 2, 2009 A quick Text prefixer: (defun c:ptxt (/ ss str) (vl-load-com) (if (and (setq ss (ssget '((0 . "*TEXT")))) (setq str (getstring t "\nSpecify Prefix: "))) (mapcar (function (lambda (x) (vla-put-TextString x (strcat str (vla-get-TextString x))))) (mapcar 'vlax-ename->vla-object (vl-remove-if 'listp (mapcar 'cadr (ssnamex ss)))))) (princ)) 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.