In AutoCAD title blocks, a common feature is the row of reference numbers along the top (and\or bottom) of the sheet. In large multipage drawings subsequent sheets may be numbered 21-40, 41-60 etc. Doing this manually is a bit tedious, and one way to make this easier is to name the page layouts according to where the numbering should start. In this case #1 means start at 1, #2 is 21, #3 is 41 etc. The title block then parses the layout name to set the numbers accordingly.
In the title block, create a table to the desired dimensions, with one data row only. For example, with 20 columns:
In the first cell enter the following:
=(1-1)*20+1
But in place of the first “1” insert a field, of type DieselExpression, with value
$(if,$(eq,$(substr,$(getvar,ctab),1,1),"#"),$(substr,$(getvar,ctab),2,2),1)
This expression reads the number from the layout name if the first character is #. If it is, then it assumes the next two values are the number of the sheet. If not, it returns 1.
In the second cell, enter “=A1+1”, and drag this formula along all the other cells.
When the block is inserted on a layout, by default it will number 1-20, but when the layout starts with a #xx then it change its numbers accordingly (run regen after renaming the layout to update the block), for example: