DATA CONVERSION

Convert to String [STR]

Converts a non-unit numeric value or a True/False value into a string.

The resulting string shows two decimal places by default.

Syntax

STR (Value, [NumberOfDecimals])

Note: The required separator (comma or semi-colon) automatically corresponds to your computer’s location settings.

Data Types of the Arguments

Value: Integer, Number, True/False

Number of Decimals (optional): Integer

Data Type of the Result

String

Example

Convert the Home Story Number element property (a number-type value) to a string.

Make sure the result is a whole number showing zero decimal places.

Expression

STR (Home Story Number, 0)

Result

2 (for a Beam with Home Story of 2)

Notes

The result string is displayed with two decimal places by default. If you do not want any decimals (as in the Home Story Number example), add 0 as the Number of Decimals argument.

To convert a unit value (e.g. a Length) to a string, use the Convert Unit to String [STRCALCUNIT] function.

For another example using STR, see Example 10: List the Total Cost of a Structure in Dollars.