AutoCAD/Fields
Expert: Scott Wilcox - 10/30/2011
QuestionI 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.
AnswerI 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