Author Topic: attribute text to dtext  (Read 3339 times)

0 Members and 1 Guest are viewing this topic.

confusedCADguy

  • Guest
attribute text to dtext
« 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

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
attribute text to dtext
« Reply #1 on: April 01, 2004, 04:26:09 PM »
I have not tried this one..


Code: [Select]
; ----------------------------------------------------------------------
; 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)
)
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

CAB

  • Global Moderator
  • Seagull
  • Posts: 10401
attribute text to dtext
« Reply #2 on: April 01, 2004, 04:29:55 PM »
Oh, I guess I'm seeing double... :shock:
I've reached the age where the happy hour is a nap. (°¿°)
Windows 10 core i7 4790k 4Ghz 32GB GTX 970
Please support this web site.

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: attribute text to dtext
« Reply #3 on: June 18, 2010, 08:30:09 AM »
Has this been tested, CAB?
CAD Tech

Rob...

  • King Gator
  • Posts: 3824
  • Take a little time to stop and smell the roses.
Re: attribute text to dtext
« Reply #4 on: June 18, 2010, 08:51:11 AM »
I just tried it out and it seems to be working fine. This is gonna save me a few hours!
CAD Tech

Matt__W

  • Seagull
  • Posts: 12955
  • I like my water diluted.
Re: attribute text to dtext
« Reply #5 on: June 18, 2010, 08:55:14 AM »
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.
Autodesk Expert Elite
Revit Subject Matter Expert (SME)
Owner/FAA sUAS Pilot @ http://skyviz.io