Share

Setting Up Expressions

Product Documentation
Intermediate

Expressions make use of the same properties that you can add to label styles, such as Point Elevation, Northing, and Easting. By using expressions, you can set up separate mathematical formulas using the existing properties. For example, you could subtract a value from a point elevation, and display that number along side the actual elevation in a point label.

Tutorial Exercise: Creating an Expression

After you set up expressions, they are available in the Properties list in the Text Component Editor so you can add them to label styles. In effect, expressions become new properties that you can use to compose a label style.

Expressions are unique to a particular label style type. Only those properties that are relevant to the label style type are available to choose from in the Expressions dialog box.

Brackets and Parentheses

When you insert a property into an expression, it appears in curly brackets if it contains spaces. For example:

{Segment Length}

Do not insert anything else into the curly brackets, and do not remove them. If the property name does not have any spaces (like Northing), then curly brackets are not required.

For expression grouping, use parentheses. For example:

0.567*({Segment Length} + 56)

Restrictions

Expressions are mathematical formulas that are used to compute a value. No text can be added directly to them. Any text you want to include can be added to the label style. For example, to convert feet to meters, you could set up the following expression:

{Segment Length} *.3084

If you want to add “meters” to the end of this string, you must add it later when you set up the label style.

To set up an expression

  1. In Toolspace, on the Settings tab, expand a label style type collection.

    For example, expand Parcel Label Styles Line.

  2. Right-click Expressions and click New.
  3. In the Expressions dialog box, enter a name and description for the expression.
    Note

    It is recommended that you use a clear naming convention such as “Parcel line expression: Length in meters” so you can distinguish them when composing a label style.

  4. Click the Insert Property button and select a property from the list.

    The property appears in the editor box.

  5. Add functions, constants, and logical operators to complete the equation.
    Note

    Do not insert anything into the curly brackets that surround the property fields.

    • Use the calculator buttons or click in the editor field and use your keypad to enter numbers and mathematical operators like * (multiply) or \ (divide).
    • Use the Insert Function button to insert mathematical functions like TAN.
    Note

    For a complete list of operators and functions, see Expressions Dialog Box.

  6. Specify how the expression should be formatted by selecting a format from the Format Result As list.
  7. Click OK.

See Inserting Expressions into Label Styles

Toolspace Context Menu

Settings tab: <drawing name> <object type collection> <label style type collection> right-click ExpressionsNew

Dialog Box


Was this information helpful?