reynaldomalasaga Posted March 3, 2017 Posted March 3, 2017 Please some one help me is there any lisp for convert attribute value to text note: 1)the value of attributes will remain even if i exploded the block Quote
Tharwat Posted March 3, 2017 Posted March 3, 2017 Are you aware of the command 'burst' that explodes attributed blocks and convert attribute objects to texts? Quote
asos2000 Posted March 5, 2017 Posted March 5, 2017 And for exisiting attributes Found somewhere I don't remeber exactly ;Converts attributes (attr. definitions, tags) to plain texts (defun C:A2T ( / ss ssl i e new grp grplst addg) (if (setq ss (ssget '((0 . "ATTDEF")))) (progn (setq ssl (sslength ss) i 0 ) (setq grplst (list 7 8 10 11 39 40 41 50 51 62 71 72 73)) (while (< i ssl) (setq e (ssname ss i)) (setq ent (entget e)) (setq new '((0 . "TEXT"))) (setq new (append new (list (cons 1 (cdr (assoc 2 ent)))))) (foreach grp grplst (setq addg (assoc grp ent)) (if (/= addg nil) (setq new (append new (list (assoc grp ent)))) ) ) (entmake new) (entdel e) (setq i (1+ i)) ) ) (princ "\nNo attribute Selected") ) (princ) ) ; defun 2 Quote
mwade93 Posted March 6, 2017 Posted March 6, 2017 Alternatively, there is this. Love this one is extremely helpful. Quote
Lee Mac Posted March 6, 2017 Posted March 6, 2017 Love this one is extremely helpful. Thank you! Quote
dieptp Posted June 13, 2020 Posted June 13, 2020 On 3/5/2017 at 4:11 PM, asos2000 said: And for exisiting attributes Found somewhere I don't remeber exactly ;Converts attributes (attr. definitions, tags) to plain texts (defun C:A2T ( / ss ssl i e new grp grplst addg) (if (setq ss (ssget '((0 . "ATTDEF")))) (progn (setq ssl (sslength ss) i 0 ) (setq grplst (list 7 8 10 11 39 40 41 50 51 62 71 72 73)) (while (< i ssl) (setq e (ssname ss i)) (setq ent (entget e)) (setq new '((0 . "TEXT"))) (setq new (append new (list (cons 1 (cdr (assoc 2 ent)))))) (foreach grp grplst (setq addg (assoc grp ent)) (if (/= addg nil) (setq new (append new (list (assoc grp ent)))) ) ) (entmake new) (entdel e) (setq i (1+ i)) ) ) (princ "\nNo attribute Selected") ) (princ) ) ; defun Thanks so much. It worked on my case! 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.