arcpy.locref.ModifyEventBehaviorRules(in_feature_class, {calibrate_rule}, {retire_rule}, {extend_rule}, {reassign_rule}, {realign_rule}, {reverse_rule}, {carto_realign_rule})
|
Name
|
Explanation
|
Data type
|
|
in_feature_class
|
The event feature class.
|
Feature Layer
|
|
calibrate_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the calibrate activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
|
String
|
|
retire_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the retire activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
|
String
|
|
extend_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the extend activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
COVER—The geometric location and measure of a line event will be modified to include a new or newly modified section.
|
String
|
|
reassign_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the reassign activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
|
String
|
|
realign_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the realign activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
COVER—The geometric location and measure of a line event will be modified to include a new or newly modified section.
|
String
|
|
reverse_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the reverse activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
|
String
|
|
carto_realign_rule
(Optional)
|
Specifies the event behavior rule that will be defined for the cartographic realignment activity.
HONOR_ROUTE_MEASURE—The measure of the event will be preserved or will change proportionally to the route's measure change. This is the default.
HONOR_REFERENT_LOCATION—The referent location of the event will be preserved.
|
String
|
Derived output
|
Name
|
Explanation
|
Data type
|
|
out_feature_class
|
The updated feature layer.
|
Feature Layer
|
Code sample
ModifyEventBehaviorRules example 1 (Python window)
The following script demonstrates how to use the ModifyEventBehaviorRules function in a Python window.
# Name: Modify_Event_Behavior_Rules_ex1.py
# Description: Modify event behavior rules for the registered event layer or feature class.
# Requires: ArcGIS Location Referencing
# Local tool variables
in_feature_class = r"Data.gdb\LRS\P_ILIInspectionRange"
calibrate_rule = "RETIRE"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Set current workspace
arcpy.env.workspace = "C:\\Data.gdb"
# Run the tool
arcpy.locref.ModifyEventBehaviorRules(in_feature_class, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)
ModifyEventBehaviorRules example 2 (stand-alone script)
The following script demonstrates how to use the ModifyEventBehaviorRules function 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 Location Referencing
# Import arcpy module
import arcpy
# Local tool variables
in_feature_class = r"Data.gdb\LRS\P_ILIInspectionRange"
calibrate_rule = "RETIRE"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Run the tool
arcpy.locref.ModifyEventBehaviorRules(in_feature_class, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)