1. Create two attributes using the Attribute Editor.
2. For the first attribute, in the Attribute Definition dialog, click on mode Lock Position, have the Insertion Point clicked on, and name the Tag as you wish (SHEETNO would be good). Indicate Left justification, your choice of text style and text height.
In the Default field, click the Insert Field button to the right.
3. In the Field Dialog that comes up you will want the Field Category to be Other. Under the Field names selection, choose DieselExpression.
Insert the following into the Diesel expression box:
$(SUBSTR,$(GETVAR,CTAB),1,4)
AutoCAD will translate this into the field expression: %<\AcDiesel $(SUBSTR,$(GETVAR,CTAB),1,4)>%
This is telling AutoCAD to pick up the first four characters in the string of the name of the tab (the CTAB variable) and to assign it to this attribute.
4. For the second attribute, fill in the Attribute Definition as above (for the Tag you can call it SHEETNAME). This time, when you call up the Field dialog, insert the following into the Diesel box:
$(SUBSTR,$(GETVAR,CTAB),5,40)
This will tell AutoCAD to start at the 5th character of the CTAB string and pick up the next 40 characters. The 40-character specification is arbitrary; you can fill it whatever string length you find appropriate or necessary for your sheet name.
Now you have two attributes that you can position wherever you want on your layout, or include in a block definition for a titleblock template.
Hope this helps!
