AutoCAD/Fields

Advertisement


Question
I am using a field to call up the file name in a title block. Is there a way to limit the number of charters displayed maybe changing the macro.

Answer
I am not sure if there is a way to do it with fields, but you can can with RTEXT.

I use the simple DIESEL expression shown:

$(SUBSTR,$(GETVAR,DWGNAME),1,12)-$(SUBSTR,$(GETVAR,CTAB),1,2)

In this particular example, this creates a text string, very much like a field, that displays two things: the dwgname and the layout name (CTAB).

The ,1,12 after the dwgname part tells AutoCAD where to start and stop displaying characters.  In my case, it shows characters 1 through 12.  If you wanted to show only the fifth to 10th characters, change the numbers to ,5,10.

The CTAB bit displays the layout tab name, but only the first two characters ,1,2.

If you want all the text to display, simply remove the text and commas after the right parenthesis.

Feel free to modify these to suit.

For more in formation on DIESEL, check the AutoCAD User's Guide.

To create, simply type RTEXT at the command prompt, and type D for DIESEL, which is the expression type. Enter the info in the dialog box.  

Regards,
Scott Wilcox  

AutoCAD

All Answers


Answers by Expert:


Ask Experts

Volunteer


Scott Wilcox

Expertise

I have been using AutoCAD since R11, and can answer questions regarding general AutoCAD, menus, toolbars, fonts, linetypes, plotting, CUI, Some Civil 3D

Experience

18 years AutoCAD user (R11- R2010), AUGI Moderator

Organizations
AUGI

Publications
CADALYST

Education/Credentials
Instructor @ Alberta School of Drafting

©2012 About.com, a part of The New York Times Company. All rights reserved.