Units used with “format()” function in the Template Editor
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
How to know what units can be used with “format()” function in the Template Editor?
For example, if I want to get GetValue("PROFILE.WEIGHT_PER_UNIT_LENGTH") in lbf/ft.
Answer:
All available units are described in the valuefieldclasses.lst file (located under ..\TeklaStructures\<version>\bin\applications\Tekla\Tools\TplEd\settings).
For example:
Weight/length = kg/m, T/m, N/m, daN/m, kN/m, lbf/ft
One example of format function is to convert weight according to the XS_IMPERIAL advanced option value:
if GetValue("ADVANCED_OPTION.XS_IMPERIAL")=="TRUE" then
format(GetValue("WEIGHT"),"Weight","lbf", 0)
else
format(GetValue("WEIGHT"),"Weight","kg", 1)
endif