Skip To Content

Modify Event Behavior Rules

Summary

Modifies event behavior rules for the registered event layer or feature class.

Usage

  • The tool sets the following event behavior rules by default:

    ActivityRules

    Calibrate Route

    Stay Put

    Reverse Route

    Stay Put

    Retire Route

    Stay Put

    Extend Route

    Stay Put

    Reassign Route

    Stay Put

Syntax

ModifyEventBehaviorRules_locref (in_feature_class, {calibrate_rule}, {retire_rule}, {extend_rule}, {reassign_rule}, {realign_rule})
ParameterExplanationData Type
in_feature_class

The event feature class.

Feature Layer
calibrate_rule
(Optional)

The event behavior rule defined for the calibrate activity.

  • STAY_PUTPreserves the geographic location of the event; measures may change. This is the default.
  • RETIREPreserves both measure and geographic location; event is retired.
  • MOVEPreserves the measures of the event; geographic location may change.
String
retire_rule
(Optional)

The event behavior rule defined for the retire activity.

  • STAY_PUTPreserves the geographic location of the event; measures may change. This is the default.
  • RETIREPreserves both measure and geographic location; event is retired.
  • MOVEPreserves the measures of the event; geographic location may change.
String
extend_rule
(Optional)

The event behavior rule defined for the extend activity.

  • STAY_PUTPreserves the geographic location of the event; measures may change. This is the default.
  • RETIREPreserves both measure and geographic location; event is retired.
  • MOVEPreserves the measures of the event; geographic location may change.
String
reassign_rule
(Optional)

The event behavior rule defined for the reassign activity.

  • STAY_PUTPreserves the geographic location of the event; measures may change. This is the default.
  • RETIREPreserves both measure and geographic location; event is retired.
  • MOVEPreserves the measures of the event; geographic location may change.
  • SNAPPreserves the location of an event by snapping the event to a concurrent route; measures may change.
String
realign_rule
(Optional)

The event behavior rule defined for the realign activity.

  • STAY_PUTPreserves the geographic location of the event; measures may change. This is the default.
  • RETIREPreserves both measure and geographic location; event is retired.
  • MOVEPreserves the measures of the event; geographic location may change.
String

Code sample

ModifyEventBehaviorRules example 1 (Python window)

The following script demonstrates how to use the ModifyEventBehaviorRules tool in a Python window.

# tool variables 
in_feature_class = r"Data.gdb\P_ILIInspectionRange"
calibrate_rule = "RETIRE"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"

# set current workspace
arcpy.env.workspace = "C:/Data.gdb"

# execute the tool
arcpy.ModifyEventBehaviorRules_locref(in_feature_class, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)
ModifyEventBehaviorRules example 2 (stand-alone script)

The following script demonstrates how to use the ModifyEventBehaviorRules tool in a stand-alone Python script.

# Name: Modify_Event_Behavior_Rules_ex2.py
# Description: Modify Event Behavior Rules for the registered event layer or feature class
# Requires: ArcGIS Pipeline Referencing 

# Import arcpy module
import arcpy 

# Check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

# Local variables 
in_feature_class = "Data.gdb\P_ILIInspectionRange"
calibrate_rule = "RETIRE"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"

# Process:  Modify Event Behavior Rules
arcpy.ModifyEventBehaviorRules_locref(in_feature_class, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing

Related topics