Categories

AutoCAD 2015 and AutoCAD LT 2015 BibleAutoCAD 2015 and AutoCAD LT 2015 Bible

The most comprehensive AutoCAD book around!

Creating fields that update automatically (for 2000-2004)

The new fields in AutoCAD 2005 make it easy to add text that updates automatically. For example, you can put today’s date, the sheet number, and Drawn By initials in your title block. However, if you don’t have 2005 but have Express Tools (they come with 2004 and you can purchase them for $149 if you have 2000, 2000i, or 2002), you can create fields using the Express Tools RTEXT command and some simple DIESEL expressions. Don’t let the DIESEL scare you; these expressions are easy to use. Here’s how:

  1. Start the RTEXT command or choose Express>Text>Remote Text. (RTEXT is often used to display text coming from an outside, or remote, file.)
  2. Choose the DIESEL option.
  3. In the Edit Rtext dialog box, enter one of the following expressions:
    • Drawing file: $(getvar, “dwgname”)
    • Drawing name with path: $(getvar, “dwgprefix”)$(getvar, “dwgname”)
    • Tab (model or layout): $(getvar, ctab)
    • Date: $(EDTIME,0, M/DD/YY)
    • Drawing property: $(getprop, property name) The standard property names are Title, Subject, Author, Comments, Keywords, LastSavedBy, and Revno. You can even use a custom property, with the format $(getprop, %custompropertyname). For example, if you have a custom property named Customer, you would use $(getprop, %customer).
  4. Click OK and follow the prompts to place the text.

Tip: To add the drawing name without the “.dwg” use the following expression:

$(substr,$(getvar, dwgname), 1[, $(-, $(strlen,$(getvar,dwgname)),4 )])

Thanks to Curtis Waguespack for this tip and the idea for this entire topic.

As you may have guessed, the “getvar” part of the code gets the value of system variables. You may find other system variables that you would like to display in your title blocks. Experiment!

Did you find this tip helpful?
Don't miss new tips!

Plus get a free Dynamic Blocks tutorial

Enter your name and email below

2 comments to Creating fields that update automatically (for 2000-2004)

  • Ed38

    Hello,
    Thank you for the expression

    cite=”$(substr,$(getvar, dwgname), 1[, $(-, $(strlen,$(getvar,dwgname)),4 )])”> I’ve been looking for this for a long time!
    I would like to push a bit further though: I would need to remove the first 17 and the last 4 characters.
    I tried to do

    but it didn’t work… could you help me?
    thanks

  • Enrico

    Thanks (it works also in Progecad)

Leave a Reply

You can use these HTML tags

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>