Is this page helpful?
358x
003451
2024-01-29

Formulas

The "Edit Formula" dialog box manages the equations of parameterized input.

Entering Formulas

To define a formula for a table cell or dialog field, use one of the following options:

  • Use the Edit Formula button in the table toolbar
  • Click on the yellow corner in the cell or dialog box (available if formula is provided)
  • Use the Arrow Right button in the dialog box

The "Edit Formula" dialog box appears.

Defining Formulas

The formula input is based on JavaScript and allows you to perform simple arithmetic operations. Enter the "Formula" into the text box. It can consist of numerical values, parameters, operators, and functions. If the formula is defined correctly, the 'Result' of the equation appears in the field below.

Please note:

  • The use of operators (+, -, *, /, ^, ==, !=, <, <=, >, >=, &, ||) and constants (PI, e) is possible
  • The use of floating point numbers can cause problems
  • Comments are not possible, not even one-line comments
  • Parameters may not be mentioned in their own definition; to define a parameter A, for example, write (B+C), but not (A=B+C)
  • The decimal separator is not a comma, but a period
Important

The numerical values are interpreted in SI base units. For an imperial system of units, the units (ft, in, kip, lbf, F) must be added.

You can use the Global Parameters button to open the list of Global Parameters. Then, select the parameter or define a new variable. Use the "OK & Insert" button to import the parameter into the formula.

You can describe the formula with functions that correspond to the conventions of JavaScript and the usual references. This way, you can also define conditions and conditionals for the value of the equation; for example, as follows:

  • A > B ? 1 : 2
  • if (A > B) 1; else 2

Furthermore, it is possible to address objects by means of their numbers and certain properties in the formula. This way, you can use, for example, the lines[3].length entry to refer to the length of Line 3. You can access the complete list of object references including syntax using the Info button.

Tip

With a prefixed equal sign, you can enter the formula directly into the cell; for example, =2.5*PI (or =2.5ft*PI for imperial units).

Displaying Formulas

A formula can be used in the cell of a table as well as in the input field of the corresponding dialog box. Since tables and dialog boxes are interactive, you can access the formulas in both input modes.

If a yellow triangle is displayed in the upper left corner of a cell, a formula is assigned to it. A red triangle means that the formula is incorrectly defined.

You can use the Show Formula button to control whether the formula or the corresponding value is displayed in the cell (see image 'Edit Formula' Button).

To delete a formula, select the corresponding cell. Then, click the button Delete Formula .

Parent Chapter