alanjt Posted April 28, 2010 Author Posted April 28, 2010 ;; Extract textstring (with symbols) from text object ;; Works on: MText, Text, Attrib, Attdef, Multileader ;; Obj - Object to extract textstring from ;; Alan J. Thompson, 11.24.09 / 04.13.10 (defun AT:TextString (Obj) (if Obj ((lambda (e s) (cond ((eq (cdr (assoc 0 e)) "MULTILEADER") (cdr (assoc 304 e))) ((vl-position (cdr (assoc 0 e)) '("ATTDEF" "ATTRIB" "MTEXT" "TEXT")) (foreach x e (and (vl-position (car x) '(1 3)) (setq s (strcat s (cdr x))))) s ) ) ) (cond ((vl-consp Obj) (entget (car Obj))) ((eq (type Obj) 'ENAME) (entget Obj)) ((eq (type Obj) 'VLA-ObjECT) (entget (vlax-vla-Object->ename Obj))) ) "" ) ) ) 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.