EvaluateRulesByPolygon

Title  Evaluate Rules by Polygon

Description

Runs the Evaluate Rules Geoprocessing tool for every input polygon.

Usage

          
When there is an active map, the Output Class will be added to the map during execution so progress can be monitored.

License

Basic

Syntax

EvaluateRulesByPolygon (in_workspace, in_features, evaluation_types, {run_async}, {partition_class})

Parameter Explanation Data Type
in_workspace Dialog Reference

A local geodatabase or feature service URL.

DEWorkspace
in_features Dialog Reference

The polygon feature class used to define evaluation areas. The extent of each feature will be used as input to Evaluate Rules.

GPFeatureLayer
evaluation_types Dialog Reference

Specifies the types of evaluation that will be used.

  • CALCULATION_RULES — Batch calculation attribute rules will be evaluated.
  • VALIDATION_RULES — Validation attribute rules will be evaluated.

GPString
run_async (Optional) Dialog Reference

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

  • ASYNC — 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.
  • SYNC — 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.

GPBoolean
partition_class (Optional) Dialog Reference

The output feature class where results will be written. This can be used to track evaluation progress.

DEFeatureClass

Code Samples

EvaluateRulesByPolygon example 1 (Python window)

Evaluates all calculation rules by quadrants.

import arcpy

arcpy.udms.EvaluateRulesByPolygon("D:/data/network.gdb", "memory/quads", "CALCULATION_RULES")

EvaluateRulesByPolygon example 2 (stand-alone script)

Runs asynchronous evaluates for all rule types.

import arcpy

url = "https://acme.com/server/rest/services/MyUtilityNetwork/FeatureServer"
quadrants = "D:/data/network.gdb/quads"
rule_types = ["CALCULATION_RULES", "VALIDATION_RULES"]
output = "memory/EvaluateResults"

arcpy.udms.EvaluateRulesByPolygon(
    in_workspace=url,
    in_features=quadrants,
    evaluation_types=rule_types,
    run_async=True,
    partition_class=output,
)