Evaluate Rules (Data Management)

Summary

Evaluates geodatabase rules and functionality.

Learn more about evaluating attribute rules

Usage

  • If there is a selection in the map, only selected features within the specified extent will be evaluated.

  • When the input workspace is a file or mobile geodatabase, the entire workspace is evaluated.

  • When the input workspace is a feature service workspace, the validation capability must be enabled.

  • The tool evaluates attribute rules for the default version.

    License:
    When working with branch versioning in an ArcGIS Enterprise 11.2 or later deployment, organization members must be assigned a license for the ArcGIS Advanced Editing user type extension to use this tool.

Parameters

LabelExplanationData Type
Input Workspace

A file geodatabase, mobile geodatabase, or feature service URL. An example of a feature service URL is https://myserver/server/rest/services/myservicename/FeatureServer.

Workspace
Evaluation Types

Specifies the types of evaluation that will be used.

  • Calculation rulesBatch calculation attribute rules will be evaluated.
  • Validation rulesValidation attribute rules will be evaluated.
String
Extent
(Optional)

The extent to be evaluated. If there is a selection in the map, only selected features within the specified extent will be evaluated.

  • Current Display Extent Map View—The extent will be based on the active map or scene. This option is only available when there is an active map.
  • Draw Extent Square and Finish—The extent will be based on a rectangle drawn on the map or scene. This option will create a feature class in the project geodatabase and add a layer to the map. The feature class will have the same coordinate system as the map.
    Note:

    This option is not available in the Environments dialog box. It is only available from a tool parameter with an extent data type or from the Environments tab on a tool dialog box.

    Note:

    When the Enable and disable editing from the Edit tab editing option is checked, you must enable editing on the Edit ribbon tab to draw the extent.

  • Extent of a Layer Layer—The extent will be based on an active map layer. Use the drop-down list to choose an available layer or use the Extent of data in all layers option to get the combined extent of all active map layers, excluding the basemap. This option is only available when there is an active map with layers.

    Each map layer has the following options:

    • All Features Select All—The extent of all features in the layer.
    • Selected Features Area from Selected Features—The extent of the selected features in the layer.
    • Visible Features Extent Indicator—The extent of visible features in the layer.
      Note:

      The extents from the Selected Features Area from Selected Features and Visible Features Extent Indicator options are only available for feature layers.

  • Browse Browse—The extent will be based on an existing dataset.
  • Intersection of Inputs Intersect—The extent will be based on the minimum or intersecting extent of all inputs. If no inputs overlap, a null extent with all zeros will result.
  • Union of Inputs Union—The extent will be based on the maximum or combined extent of all inputs.
  • Clipboard Paste—The extent can be copied to and from the clipboard.
    • Copy Extent Copy—Copies the extent coordinates and coordinate system to the clipboard.
    • Paste Extent Paste—Pastes the extent coordinates and, optionally, the coordinate system from the clipboard. If the clipboard values do not include a coordinate system, the extent will use the map’s coordinate system.
    Note:

    The extent coordinates are copied to and pasted from the clipboard using the same formatting and order as the ArcPy Extent object: x-min, y-min, x-max, y-max, and the spatial reference.

  • Reset Extent Reset—The extent will be reset to the default value.
  • Manually entered coordinates—The coordinates must be numeric values and in the active map's coordinate system.
    Caution:

    The map may use different display units than the entered coordinates. The use of a cardinal direction (N, S, E, W) is not supported. Use a negative value sign for south and west coordinates.

Extent
Async
(Optional)

Specifies whether the evaluation will run synchronously or asynchronously. This parameter is only supported when the input workspace is a feature service.

  • Checked—The evaluation will run asynchronously. This option dedicates server resources to run the evaluation with a longer time-out. Running asynchronously is recommended when evaluating large datasets that contain many features requiring calculation or validation. This is the default.
  • Unchecked—The evaluation will run synchronously. This option has a shorter time-out and is best used when evaluating an extent with a small number of features requiring calculation or validation.

Boolean

Derived Output

LabelExplanationData Type
Updated Workspace

The updated feature service workspace that has been evaluated.

Workspace

arcpy.management.EvaluateRules(in_workspace, evaluation_types, {extent}, {run_async})
NameExplanationData Type
in_workspace

A file geodatabase, mobile geodatabase, or feature service URL. An example of a feature service URL is https://myserver/server/rest/services/myservicename/FeatureServer.

Workspace
evaluation_types
[evaluation_types,...]

Specifies the types of evaluation that will be used.

  • CALCULATION_RULESBatch calculation attribute rules will be evaluated.
  • VALIDATION_RULESValidation attribute rules will be evaluated.
String
extent
(Optional)

The extent to be evaluated. If there is a selection in the map, only selected features within the specified extent will be evaluated.

  • MAXOF—The maximum extent of all inputs will be used.
  • MINOF—The minimum area common to all inputs will be used.
  • DISPLAY—The extent is equal to the visible display.
  • Layer name—The extent of the specified layer will be used.
  • Extent object—The extent of the specified object will be used.
  • Space delimited string of coordinates—The extent of the specified string will be used. Coordinates are expressed in the order of x-min, y-min, x-max, y-max.
Extent
run_async
(Optional)

Specifies whether the evaluation will run synchronously or asynchronously. This parameter is only supported when the input workspace is a feature service.

  • ASYNCThe evaluation will run asynchronously. This option dedicates server resources to run the evaluation with a longer time-out. Running asynchronously is recommended when evaluating large datasets that contain many features requiring calculation or validation. This is the default.
  • SYNCThe evaluation will run synchronously. This option has a shorter time-out and is best used when evaluating an extent with a small number of features requiring calculation or validation.
Legacy:

In earlier releases, this parameter was named async. At ArcGIS Pro 2.4, the parameter name was changed to run_async to avoid conflicts with the reserved Python keyword async.

Boolean

Derived Output

NameExplanationData Type
updated_workspace

The updated feature service workspace that has been evaluated.

Workspace

Code sample

EvaluateRules example (stand-alone script)

Evaluate validation rules asynchronously using the EvaluateRules function.

# Import arcpy
import arcpy

# Assign local variables
in_workspace = "https://myserver/server/rest/services/myservicename/FeatureServer"
extent = "-113.187897827702 38.0958054854392 -113.142166008849 38.1404599940719"

# Run the evaluation
arcpy.management.EvaluateRules(in_workspace, "VALIDATION_RULES", extent, "ASYNC")

Environments

This tool does not use any geoprocessing environments.

Related topics