Formatting formula results

Formatting formula results

==========================


==========================

Where to enter the formatting

You set how you want formula results to appear in the Formatting box. You do this while defining or editing the parameter in the cost model.

The types of formatting for parameter values are: N, nN, fN or fN...N, where N is any digit. Examples: 3; n2; f16, f32.

Supported Units: mm, cm, dm, m, inch, foot, point (1/72 of the inch).

Formatting of fractions and mixed numbers

Examples of fractions or mixed numbers formatting are: 2 7/16; 3 5/8.

If the set precision is not a power of 2, the number is rounded up to the nearest power of 2. For example, f6 becomes f8; f10 becomes f16. EXAMPLE: If as a result you get 34.312892, it will be displayed as 34.3129.

TIP: To avoid errors, specify the formatting and precision while you are creating formulas.

The display precision for decimal formatting is automatically converted from the fractional 1/16 to the decimal 4, and the result is rounded appropriately. In the following table, see how the conversion works:

Fractional
Precision
Decimal
Precision
0 0
1/2 1
1/4 2
1/8 3
1/16 4
1/32 5
1/64 6

Examples

Type in the Formatting Box The Precision You Get
f; Default precision
f8; Precision 8

Decimal formatting

Examples of decimal formatting are: 4.32; 5.43.

For decimal fractions, you can set EngView to display a specific number of digits after the decimal separator and hide the zeroes if the computed value is an integer. To do this, use a formatting with a negative number — for example n–2. This formatting makes sure that if the computed value is a decimal fraction, EngView will display the two-digit fractional part to the right of the decimal separator. If the computed value is an integer, the zeroes after the decimal separator will not appear. Examples:

Type in the Formatting Box The Precision You Get
n; mm Decimal, default precision
n2; mm Decimal, precision 2 (Two digits will appear to the right of the decimal separator.)
n-2; mm If the computed value is a fractional value, two digits will appear after the decimal separator; it it is an integer, no digits (they are zeroes) will appear after the decimal separator.

Unspecified formatting

If you do not specify the display format type — decimal or fractional — the default formatting will be used. NOTE: You can specify only the precision.

Type in the Formatting Box The Precision You Get
n2; mm 2
n4; mm 4
; mm Default precision

NOTE: Formats other than a power of 2 are rounded up to the nearest power of 2 — for example, f6 becomes f8; f10 becomes f16.

Using a digit grouping symbol (thousands separator)

To use a digit grouping symbol for computed formula results, insert a t in the formula's formatting section — between the precision mark and the closing $ sign. This tells EngView to use your system's digit grouping symbol (set in the regional settings) when displaying formula results.

In the examples below, comma is the digit grouping symbol. In the left-hand column, see how to place the t mark in formulas and how EngView then displays computed formula results.

Type in the Formatting Box The Result (Thousands-Separated, with Precision)
n2t; mm 2,000.25 mm
n4t; mm 4,000.3457 mm
nt; 4,000

Notes

If a predefined formula cannot be calculated, Not calculated appears in the Value column of the Cost Estimator tab in the tabular area. The entire row and all dependent rows below are highlighted. When you point to the Not calculated text, a description of the error appears in a tooltip.

Not Calculated View

Notes on Formula Syntax: Space-Separated Style Names; Case Sensitivity; List Separators

USE QUOTATION MARKS TO ENCLOSE SPACE-SEPARATED STYLE NAMES

In a formula, to refer to a style whose name is made up of multiple words separated by spaces, enclose the style name in quotation marks, like this (in red):

$OneUp1.Length("Rillen 3pt", m)$

$OneUp1.Length("Rillen mit Rillkörper", m)$

TYPE MEASUREMENT UNITS AND FORMATTING SYMBOLS IN LOWER CASE

When a formula contains measurement units and/or formatting symbols, type them in lower case, like this (in red):

$LayOUT1.SHEETWidth(mm); n2$

$Layout1.lenght(m)$

KNOW YOUR LIST SEPARATOR

This guide uses semicolon — (;) — to separate formula attributes. If your own system uses a list separator that is different from semicolon — for example, comma (,) — copying a formula from the help guide and then pasting it into EngView will return an error and the formula will not calculate.

So when typing a formula, ensure that the list separator used in the formula is identical with the one set for your system. This means that you may need to edit either (1) your system's list separator setting or (2) the formula you are typing. The examples that follow illustrate how to edit formulas that use semicolons into ones that use colons (in red):

AS PRESENTED IN THE HELP GUIDE. LIST SEPARATOR IS SEMICOLON (;)

$Layout1.Area(m; Plotting); n2$

$Layout1.AreaEx(yes; mm); n2$

$Layout1.SheetHeight(mm); n2$

$Fold3D1.BoundingBoxWidth(Production; mm; yes)$

TYPE FORMULAS LIKE THIS IF YOUR LIST SEPARATOR IS COMMA (,)

$Layout1.Area(m, Plotting), n2$

$Layout1.AreaEx(yes, mm), n2$

$Layout1.SheetHeight(mm), n2$

$Fold3D1.BoundingBoxWidth(Production, mm, yes)$