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.
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)
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.
- In Toolspace, on the Settings tab, expand a label style type collection.
- Right-click Expressions and click New.
- In the Expressions dialog box, enter a name and description for the expression.
- Click the Insert Property button and select a property from the list.
- Add functions, constants, and logical operators to complete the equation.
- 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.
NoteFor a complete list of operators and functions, see Expressions Dialog Box.
- Specify how the expression should be formatted by selecting a format from the Format Result As list.
- Click OK.
