Adding sheet number to drawing title block
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
How can I get the sheet number visible in the drawing title block?Answer:
In the Template Editor, open the title block template and add there a value field that contains the following formula:
- If the content type of the row is CAST_UNIT or ASSEMBLY:
mid(GetValue("CURRENT_DRAWING.NAME_BASE"),(1+(find(GetValue("CURRENT_DRAWING.NAME_BASE"),"-"))),2)
- If the content type of the row is DRAWING:
mid(GetValue("NAME_BASE"),(1+(find(GetValue("NAME_BASE"),"-"))),2)
The two above formulas also return zero values, but if you want to skip the zero values and return the value only when a sheet number has been defined (for assembly drawings), use the following formulas:
DRAWING
For the DRAWING content type row:
if (match(GetValue("NAME_BASE"),"*-*"))
then mid(GetValue("NAME_BASE"),(1+(find(GetValue("NAME_BASE"),"-"))),2)
else ""
endif
ASSEMBLY
For the ASSEMBLY content type row:
if (match(GetValue("CURRENT_DRAWING.NAME_BASE"),"*-*"))
then mid(GetValue("CURRENT_DRAWING.NAME_BASE"),(1+(find(GetValue("CURRENT_DRAWING.NAME_BASE"),"-"))),2)
else ""
endif