Apply Event Behaviors (Location Referencing)

Summary

Updates the event locations for all event feature classes registered with the input network based on the route edit performed.

The events are updated pursuant to the configured event behavior.

Learn more about configuring event behavior in ArcGIS Pipeline Referencing or configuring event behavior in ArcGIS Roads and Highways.

Illustration

Apply Event Behaviors tool illustration

Usage

  • An LRS dataset is required to run this tool. To create an LRS dataset, add the calibration point, centerline, and redline layers to a feature dataset; then run the Modify LRS tool with the geodatabase as the input.

  • This tool will process all event behaviors for all event feature classes registered with the input network.

  • This tool will process edits that have not been processed earlier in the working geodatabase version. Once the event behavior for a particular route edit is processed, it is marked as processed. When you post the edits to the parent version, if the event behavior is already processed, they will not be processed again.

    Note:

    Selection or definition queries used to filter the route or event records in the map are ignored to keep events in sync with route edits.

  • Caution:

    This tool modifies the event records in the event feature classes. See Tools that do not create output datasets for more information and strategies to avoid unwanted data changes.

  • When conflict prevention is enabled and route edits (including create, realign, reassign, retire, extend, calibrate, and cartographic realignment) are made in a child version, run this tool before posting that version. If the route edits are made in the default version, you must run this tool before any child version can be reconciled with the default version.

  • This tool supports conflict prevention and will attempt to acquire and transfer locks.

    Learn more about conflict prevention in ArcGIS Pipeline Referencing or conflict prevention in ArcGIS Roads and Highways.

  • This tool automatically regenerates intersection features if all of the following criteria are met:

Parameters

LabelExplanationData Type
Input Route Features

The LRS Network for which event locations will be updated. This must be a feature layer registered as a network with the LRS.

Feature Layer

Derived Output

LabelExplanationData Type
Output Event Layers

The updated event layers.

Feature Layer
Output Details File

A text file that details changes made by the tool.

Text File

arcpy.locref.ApplyEventBehaviors(in_route_features)
NameExplanationData Type
in_route_features

The LRS Network for which event locations will be updated. This must be a feature layer registered as a network with the LRS.

Feature Layer

Derived Output

NameExplanationData Type
out_event_layers

The updated event layers.

Feature Layer
out_details_file

A text file that details changes made by the tool.

Text File

Code sample

ApplyEventBehaviors example 1 (stand-alone script)

Demonstrates how to use the ApplyEventBehaviors function as a stand-alone Python script.

# Name: ApplyEventBehaviors_Pro_ex1.py
# Description: Processes event behaviors for events impacted by edits to the LRS Network in a stand-alone script.
# Requirements: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Tool variables
network = r"C:\Data\UPDM.gdb\LRS\P_StationSeriesNetwork"

# Execute the tool
arcpy.locref.ApplyEventBehaviors(network)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')
ApplyEventBehaviors example 2 (Python window)

Demonstrates how to use the ApplyEventBehaviors function in the Python window.

# Name: ApplyEventBehaviors_ex2.py
# Description: Process event behaviors for events impacted by edits to the LRS Network in the Python window.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Set tool variables
in_route_features = "Station_Series_Network"

# Set current workspace
arcpy.env.workspace = "C:\Data\Outputs.gdb"

# Execute the tool
arcpy.locref.ApplyEventBehaviors(in_route_features)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')
ApplyEventBehaviors example 3 (stand-alone script)

Demonstrates how to use the ApplyEventBehaviors function as a stand-alone Python script in a feature service.

# Name: ApplyEventBehaviors_Pro_Ex3.py
# Description: Processes event behaviors using a feature service. It is recommended to work in a version and post it into the default version.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

## Input LRS route network is in feature service.  Signing in portal is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

## Map the  LRS network from the feature service. Here, 1 corresponds to the  LRS network.
in_network_layer = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/1"

# Execute the tool
arcpy.locref.ApplyEventBehaviors(in_network_layer)

# Check in licenses
arcpy.CheckInExtension('LocationReferencing')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires ArcGIS Location Referencing
  • Standard: Requires ArcGIS Location Referencing
  • Advanced: Requires ArcGIS Location Referencing

Related topics