To evaluate properties in an expression using an operator (Procedure)

Autodesk Expression Builder

 
Evaluating Properties
Concept Procedure
 
 
 

To evaluate properties in an expression using an operator

  1. Select the command for which you want to create an expression.
  2. In the expression area, do one of the following:
    • Enter a property name manually.
    • Click Property. In the Property list, select a property.
  3. Enter an operator using one of these methods:
    • Enter an operator manually.
    • Click an operator button.

      Use the Operator buttons.

    • Select an operator from a menu.
  4. You can use the following types of operators:

    • Math Operators

      For example, this expression could be used to label repair locations with the total amount spent on parts and labor for a pipe repair project:

      PIPE_PARTS_COST + PIPE_LABOR_COST

    • Comparison Operators

      For example, to find parcels whose assessed value is $100,000 or more, use this expression:

      PARCEL_VALUE >= 100000

    • Logical Operators

      For example, to find only parcels that have a value for the PARCEL_OWNER property, use this expression:

      NOT PARCEL_OWNER NULL

  5. Select or type the value to evaluate.
  6. To create a complex property evaluation, insert an AND or OR operator, and then insert another property, operator, and value combination.

    Every operator must be preceded by a property. For example, to find parcels whose last purchase date is after 1990 and before 2005, the expression must look like this:

    PURCHASE_DATE > 1990 AND PURCHASE_DATE < 2005

  7. Click OK to apply the expression.

To evaluate properties in an expression using a function or option

  1. Select the command for which you want to create an expression.
  2. In the expression area, do one of the following:
    • Type a function or option for this property.
    • Select a function or option from a menu.

      You can use the following types of functions:

      • Math Functions

        For example, to find the square root of the value representing parcel area, use this expression:

        Sqrt(PARCEL_AREA)

      • Numeric Functions

        Numeric functions are available from the Math Functions menu. For example, to round the assessed value of parcels down to the nearest lower whole dollar, use this expression:

        Floor(PARCEL_VALUE)

      • Text Functions

        For example, to convert pipe names to all uppercase letters, use this expression:

        Upper(PIPE_NAME)

      • Date Functions

        For example, to add one month to the start date for a project, use this expression:

        AddMonths(START_DATE, 1)

      You can use the following types of options:

      • Geometric Options

        For example, to find the perimeter value for parcels, use this expression (when Parcels is the current feature or layer):

        Length2D(Geometry)

        NoteThe Geometry property may have a different name in your data store. It is always listed under Geometry Properties in the Property list. Insert the property from the list. Do not change it manually or substitute a value for this property.
      • Conversion Options

        For example, to create label text that displays “Unoccupied” if the property Occupied is null, use this expression:

        NullValue(OCCUPIED, 'Unoccupied')

      • Aggregate Options

        Aggregate functions are not available from a menu, but you can type them in. For example, to find the median value of all parcels, use this expression:

        Median(PARCEL_VALUE)

  3. In your expression, do one of the following:
    • Enter a property name manually.
    • Click Property. In the Property list, select a property.
  4. Select or type the value to evaluate.
  5. To create a complex property evaluation, insert an AND or OR operator, and then insert another operator, property, and value combination.
  6. Click OK to apply the expression.