Using the number data type in a report template

Tekla Structures
Not version-specific
Tekla Structures
Environment
Not environment-specific
Question:
I am using a template to report the dimension of a part in my model (e.g. WIDTH = 200mm), but the result I am getting is slightly off (e.g. WIDTH =199mm). This seems to occur only in some parts. Why does this occur?

Image
Width_incorrect.jpg


Answer:
The reason is most likely that the part is not exactly 200mm wide, but very close e.g. 199.999mm. In addition, the template that you are using may have Data Type: Number set as the WIDTH attribute, as shown below.

Image
width_template.jpg


When you use Number, the template will use integer type values, which take only the integer part of a decimal number. In this case, it will take the ‘199’. The solution would be to use Data Type: Number with decimals, which rounds numbers depending on the number of decimals used. When you do this, you can see the real value:

Image


If you wish the template to display 200mm, you can either re-model your part correctly to 200mm, or use 0 decimals in the template.
Was this helpful?
Submit