Lt Dan's legs Posted July 27, 2010 Posted July 27, 2010 The wording changes from job to job lets say i've entsel the wording for this text Largest rectangle -- x --. once I've retrieve this how do I change the text to Largest rectangle -- x wording changes from job to job but the -- x --. stays the same. Quote
Lee Mac Posted July 27, 2010 Posted July 27, 2010 What are you looking to identify the change by? Knock off everything after "x"? Quote
Lee Mac Posted July 27, 2010 Posted July 27, 2010 Just written quickly: (defun c:revtxt nil ( (lambda ( s i / e a l ) (vl-load-com) (if s (while (setq e (ssname s (setq i (1+ i)))) (if (wcmatch (setq a (cdr (assoc 1 (setq l (entget e))))) "*x*") (entupd (cdr (assoc -1 (entmod (subst (cons 1 (substr a 1 (1+ (vl-string-position 120 a)))) (assoc 1 l) l ) ) ) ) ) ) ) ) ) (ssget "_:L" '((0 . "TEXT"))) -1 ) (princ) ) 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.