Layout name as Field variable for page number.

Layout name as Field variable for page number.

jenneferw
Explorer Explorer
13,022 Views
5 Replies
Message 1 of 6

Layout name as Field variable for page number.

jenneferw
Explorer
Explorer

Hi, I am wondering if there is a way to use the 'Layout name' as a field variable for a page #. I am setting up a dynamic title block and would like my page numbers to generate and match my layout name. 

0 Likes
Accepted solutions (1)
13,023 Views
5 Replies
Replies (5)
Message 2 of 6

ChicagoLooper
Mentor
Mentor
Accepted solution

Edit the layout tab so it will be the page number, e.g. 01, 02, A101, A102, A103, etc. The page number in your titleblock should be an attribute and you can populate the attribute using a field. System Variable=>ctab.   

 

10.png

Chicagolooper

EESignature

Message 3 of 6

jenneferw
Explorer
Explorer

Thanks, I knew it had to be in the System Variable somewhere. This is exactly what I was looking for!

0 Likes
Message 4 of 6

vladimir_michl
Advisor
Advisor

Or you can base your page numbering also on the layout order (not name) - see PageOf:

CAD Forum - Total number of layouts as a field (Page 3 of 7).

 

Vladimir Michl, www.arkance-systems.cz - www.cadforum.cz

 

0 Likes
Message 5 of 6

luisJHR3X
Observer
Observer

Very nice!

 

Is it possible to have the field show name only after 4 characters?
e.g: Layout sheet name: 'A01 Proposed Plan'

Show: 'Proposed Plan'

 

And the reverse, showing only the first 3 characters: 'A01'

 

This would be fantastic.

0 Likes
Message 6 of 6

jsmith10
Explorer
Explorer

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! 

ATTE.png

0 Likes