Lee Mac Posted May 21, 2010 Posted May 21, 2010 How about something like this: (defun c:addm ( / ss ) ;; Lee Mac ~ 21.05.10 (if (setq ss (ssget "_X" '((0 . "TEXT,MTEXT") (8 . "text") (1 . "#*")))) ( (lambda ( i / e ) (while (setq e (ssname ss (setq i (1+ i)))) (Update (SubstDXF 11 (cdr (assoc 10 (entget e))) (SubstDXF 73 2 (SubstDXF 72 1 (SubstDXF 1 (strcat (cdr (assoc 1 (entget e))) "m") (entget e) ) ) ) ) ) ) ) -1 ) ) (princ) ) (defun SubstDXF ( code value elist ) (entmod (subst (cons code value) (assoc code elist) elist ) ) ) (defun Update ( elist ) (entupd (cdr (assoc -1 elist)) ) ) Quote
jamesfear Posted May 21, 2010 Posted May 21, 2010 Cheers Lee, I'll look into doing a math degree now. Thanks for the quick response, I'll test it at work and let you know if it worked! (due to not having cad at home haha) James Quote
jamesfear Posted May 24, 2010 Posted May 24, 2010 Also I really like your T2M and got an idea that I can't write lol I was also wondering if you could do a like a combine 2 or 3 texts in one line without moving its postion if you know what I mean? I'll show you an example with the other thing I am having problems with. I'll attach both the lisp and a picture example hopfully lol. and yeah I had trouble with loading the pic thats why its in a word doc lol. Hey Lee, The SUFFIX works perfect. Did you get a chance to look at the above quote?? I think I told you not to worry about it but I am still having trouble with it lol. I'll send you a dwg with an example of what I'm trying to do. Looked at a few Math Degrees but alot of them arn't suited to my work needs, might have to drop off to part time if I want to fully commit to Lisp writting ahaha which I do. Example.dwg Quote
Lee Mac Posted May 24, 2010 Posted May 24, 2010 Just a very quick written code: (defun c:jt ( / ent ss ) (if (setq ent (ssget "_+.:E:S" '((0 . "TEXT,MTEXT")))) (progn (setq ent (entget (ssname ent 0))) (if (setq ss (ssget "_:L" '((0 . "TEXT,MTEXT")))) ( (lambda ( i / e ) (while (setq e (ssname ss (setq i (1+ i)))) (setq ent (SubstDXF 1 (strcat (cdr (assoc 1 ent)) (cdr (assoc 1 (entget e)))) ent ) ) (entdel e) ) ) -1 ) ) (Update ent) ) ) (princ) ) (defun SubstDXF ( code value elist ) (entmod (subst (cons code value) (assoc code elist) elist ) ) ) (defun Update ( elist ) (entupd (cdr (assoc -1 elist)) ) ) Select first Text, then select all the text that you want to 'join' to it. Quote
jamesfear Posted May 24, 2010 Posted May 24, 2010 lengend! pretty good for a quicky "that's what she said" lol 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.