TheSwamp
Code Red => AutoLISP (Vanilla / Visual) => Topic started by: confusedCADguy on April 01, 2004, 03:45:51 PM
-
Greetings all,
I have numerous drawings with a base plan xrefed into it. I have quite a few blocks with attributes that have been exploded. Yes that’s right, exploded. Now everyone knows you shouldn't explode blocks with attributes if they are being xrefed. So anyway, now that I’m done beating the a$$ of the person who did it I need to know if there is a way to convert the exploded attributes to dtext. I tried TXT2MTXT.lsp and for some reason the text disappears even though it says an mtext object was added.
Thanks
-
I have not tried this one..
; ----------------------------------------------------------------------
; DISCLAIMER: DotSoft Disclaims any and all liability for any damages
; arising out of the use or operation, or inability to use the software.
; FURTHERMORE, User agrees to hold DotSoft harmless from such claims.
; DotSoft makes no warranty, either expressed or implied, as to the
; fitness of this product for a particular purpose. All materials are
; to be considered ‘as-is’, and use of this software should be
; considered as AT YOUR OWN RISK.
; ----------------------------------------------------------------------
(defun C:TAG2TXT ()
(setq sset (ssget '((0 . "ATTDEF"))))
(setq num (sslength sset) itm 0)
(while (< itm num)
(setq hnd (ssname sset itm))
(setq ent (entget hnd))
(setq new '((0 . "TEXT")))
(setq new (append new (list (cons 1 (cdr (assoc 2 ent))))))
(setq dolst (list 7 8 10 11 39 40 41 50 51 62 71 72 73))
(foreach grp dolst
(setq addto (assoc grp ent))
(if (/= addto nil)
(setq new (append new (list (assoc grp ent))))
)
)
(entdel hnd)
(entmake new)
(setq itm (1+ itm))
)
(princ)
)
-
Oh, I guess I'm seeing double... :shock:
-
Has this been tested, CAB?
-
I just tried it out and it seems to be working fine. This is gonna save me a few hours!
-
I just tried it out and it seems to be working fine. This is gonna save me a few hours!
I've used that routine before a number of times without any problems.