Jump to content

Can you convert FIELDS to Text??


tzframpton

Recommended Posts

Just wondering.... I thought there was a command that does this. Tons of fields in a drawing that I really don't wanna retype. Thanks in advance :)

Link to comment
Share on other sites

  • Replies 21
  • Created
  • Last Reply

Top Posters In This Topic

  • tzframpton

    5

  • NBC

    2

  • Dadgad

    2

  • anaskattayil

    2

Top Posters In This Topic

Posted Images

From the Help menu. Ah, I'm so lazy.... Sorry about that. :oops:

 

Converting Fields to TextUse this procedure to convert a field to text.

NoteThis procedure cannot be reversed.

  1. Navigate to the field you want to convert to text. Fields can be contained in AutoCAD text, multiline text (mtext), table cells, attributes, property set definitions, object properties, object styles., and project details. For information about inserting fields in text components, see Inserting Fields.
  2. Select the field, right-click, and click Convert Field to Text.

Link to comment
Share on other sites

Explode should work - however it depends on how you use explode.

XPLODE doesn't work, but EXPLODE seems to

Tried both, doesn't work. :(

Link to comment
Share on other sites

  • 5 years later...

I had a drawing with file name , date & time ( Field Rtext)in the right side corner of drawing sheet. Unfortunately its erased from me. please can you help me for making new one... or any lisp for that????

Link to comment
Share on other sites

I had a drawing with file name , date & time ( Field Rtext)in the right side corner of drawing sheet. Unfortunately its erased from me. please can you help me for making new one... or any lisp for that????

 

Have you tried using the OOPS command?

 

If that doesn't work (seriously, try the OOPS command first),

then refer to the screenshot where you can learn

how to replace what you seem to have erased or misplaced.

CREATING A PLOT STAMP STYLE.jpg

Link to comment
Share on other sites

Try doing a PLOTPREVIEW, and you may find that it will be generated, when it is plotted,

as I suspect that it is a PLOT STAMP, rather than a simple field which has been inserted.

Link to comment
Share on other sites

  • 1 year later...

(defun C:R-FIELDS ( / del-field ss1 index item)
 (defun del-field (ent / edic)
   (if (setq edic (cdr (assoc 360 (entget ent))))
      (dictremove edic "ACAD_FIELD")
   )
 )
 (if (= (getvar "TILEMODE") 0)
   (progn
    (setvar "TILEMODE" 1)
    (command "REGEN")
   )
 )
 (if
   (setq ss1
     (ssget "X"
       (list (cons 0 "TEXT,MTEXT,MULTILEADER")
             (cons 67 0)
       )
     )
   )
   (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"
      (list (cons 0 "INSERT")
            (cons 67 0)
            (cons 66 1)
      )
    )
  )
  (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)
)


 

This code will replace all fields within all text, mtext, and dimensions

 

 

It will not convert fields where the MtextColumn Value is Dynamic...so for anyone that knows of a way to tweak it and make that happen it would be greatly appreciated

Edited by mbrandt5
Link to comment
Share on other sites

Hi,

 

I've tried to use your code, but in paper space, because it's where I have all my fields...

I've disabled the space control inside your code to not switch to tilemode 1.

I obtain no error, but all my fields stayed in place...

Do you have an idea of the reason why it doesn't work in paper space ?

To match my need, do you know about a code wich works in paperspaces (several layouts... But I don't mind in launching a comand in each one...

 

For more detail you may visit http://sd-academy.com/

Link to comment
Share on other sites

When I list a Field it shows as Mtext, I use Explode and it becomes Text. 2016.

 

That's normal behavior; if you dump the Visual LISP properties see TextString, or view an attributed block that's been populated via Fields in Properties pane, you'll see the resultant String output of the evaluated FieldCode.

 

Explode merely gets the TextString and applies that to the resultant MText, etc.

 

Cheers

Link to comment
Share on other sites

That's normal behavior; if you dump the Visual LISP properties see TextString, or view an attributed block that's been populated via Fields in Properties pane, you'll see the resultant String output of the evaluated FieldCode.

 

Explode merely gets the TextString and applies that to the resultant MText, etc.

 

Cheers

 

The OP said it wasn't working for him, I simply posted that it worked as expected on my setup.

Link to comment
Share on other sites

  • 2 weeks later...

to convert field into txt. I have two methods

1. if your fields are in text format only, just convert it into mtext using lee mac t2m lisp. then explode it

2. if your fields are in mtext format, just simply explode it.

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...