Results 1 to 7 of 7

Thread: Converting All Fields To text

  1. #1
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Converting All Fields To text

    Does anyone know of a command that converts all fields in a drawing to text?

  2. #2
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    Nvm already found one

  3. #3
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    Quote Originally Posted by mbrandt5 View Post
    Nvm already found one
    Please share a link to it.

  4. #4
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    I have not tested the lisp yet but here is the link

    http://forums.autodesk.com/t5/visual...1722015/page/2
    Last edited by mbrandt5; 2015-07-16 at 02:21 PM.

  5. #5
    Certifiable AUGI Addict
    Join Date
    2001-03
    Location
    Tallahassee, FL USA
    Posts
    3,658
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    Quote Originally Posted by mbrandt5 View Post
    I have not tested the lisp yet but here is the link

    http://forums.autodesk.com/t5/visual...1722015/page/2
    Try this modified from Convert Fields to Text in Paper Space by: Ian_Bryant:
    Code:
    ;| Convert All Fields to Text in drawing modified from Convert Fields to Text in Paper Space by: Ian_Bryant
    http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/convert-field-to-text/td-p/1722015 |;
    (defun C:R-FIELDS-ALL ( / del-field ss1 index item)
      (vl-load-com)
      (defun del-field (ent / edic elist etype obj val)
       (if
         (and
          (setq edic (cdr (assoc 360 (setq elist (entget ent)))))
          (dictsearch edic "ACAD_FIELD")
         )
         (progn
           (setq obj (vlax-ename->vla-object ent)
                 etype (cdr (assoc 0 elist))
          )
          (cond
            ((= etype "DIMENSION")
             (setq val (vla-get-textoverride obj))
             (dictremove edic "ACAD_FIELD")
             (vla-put-textoverride obj val)
            )
            ((= etype "MTEXT")
             (setq val (vla-get-textstring obj))
             (dictremove edic "ACAD_FIELD")
             (vla-put-textstring obj val)
            )
            (T (dictremove edic "ACAD_FIELD"))
          )
        )
       )
      )
      (if
        (setq ss1
          (ssget "X" '((0 . "TEXT,MTEXT,MULTILEADER,DIMENSION")))
        )
        (progn
         (setq index 0)
         (repeat (sslength ss1)
           (setq item (ssname ss1 index))
           (if (del-field item) (entupd item))
           (setq index (+ 1 index))
         )
        )
      )
      (if
       (setq ss1
          (ssget "X" '((0 . "INSERT")))
       )
       (progn
         (setq index 0)
         (repeat (sslength ss1)
           (setq item (ssname ss1 index))
           (while (= (cdr (assoc 0 (entget (setq item (entnext item))))) "ATTRIB")
             (if (del-field item) (entupd item))
           )
           (setq index (+ 1 index))
         )
       )
      )
      (princ)
    )
    another Convert Fields from selected objects to Text modified from Convert Fields to Text in Paper Space by: Ian_Bryant:
    Code:
    ;| Convert Fields from selected objects to Text
       modified from Convert Fields to Text in Paper Space by: Ian_Bryant
    http://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/convert-field-to-text/td-p/1722015 |;
    (defun C:R-FIELDS ( / del-field ss1 index item)
      (vl-load-com)
      (defun del-field (ent / edic elist etype obj val)
       (if
         (and
          (setq edic (cdr (assoc 360 (setq elist (entget ent)))))
          (dictsearch edic "ACAD_FIELD")
         )
         (progn
           (setq obj (vlax-ename->vla-object ent)
                 etype (cdr (assoc 0 elist))
          )
          (cond
            ((= etype "DIMENSION")
             (setq val (vla-get-textoverride obj))
             (dictremove edic "ACAD_FIELD")
             (vla-put-textoverride obj val)
            )
            ((= etype "MTEXT")
             (setq val (vla-get-textstring obj))
             (dictremove edic "ACAD_FIELD")
             (vla-put-textstring obj val)
            )
            (T (dictremove edic "ACAD_FIELD"))
          )
        )
       )
      )
      (if
        (setq ss1
          (ssget '((0 . "TEXT,MTEXT,MULTILEADER,DIMENSION,INSERT")))
        )
        (progn
         (setq index 0)
         (repeat (sslength ss1)
           (setq item (ssname ss1 index))
           (if(=(cdr(assoc 0(entget item))) "INSERT")
             (while (= (cdr (assoc 0 (entget (setq item (entnext item))))) "ATTRIB")
               (if (del-field item) (entupd item))
             )
             (if (del-field item) (entupd item))
           )
           (setq index (+ 1 index))
         )
        )
      )
      (princ)
    )

  6. #6
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    This does not work with a dynamic block bursted attribute with fields within it...The fields can still be converted to text after the burst occurs...

    Though the code will not convert it to text only make it a value of nill any idea why this is occurring?

  7. #7
    I could stop if I wanted to
    Join Date
    2009-10
    Posts
    262
    Login to Give a bone
    0

    Default Re: Converting All Fields To text

    Anybody please help...

Similar Threads

  1. Converting Text in tables
    By michael105936 in forum AutoCAD Tables
    Replies: 3
    Last Post: 2009-05-11, 06:20 PM
  2. Converting LocationPoint of Text to XYZ
    By drodrigues in forum Revit - API
    Replies: 2
    Last Post: 2009-03-30, 03:39 PM
  3. Converting Revit text element into a string in C#
    By drodrigues in forum Revit - API
    Replies: 2
    Last Post: 2008-08-27, 06:15 PM
  4. AutoCAD LT 20006 Converting Text to MText
    By nanoaguilar2000 in forum AutoCAD LT - General
    Replies: 2
    Last Post: 2006-04-11, 09:38 PM
  5. Converting Text to Mtext problems
    By matt.bellenoit in forum AutoCAD General
    Replies: 1
    Last Post: 2004-10-06, 05:19 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •