Apply Event Behaviors (Location Referencing)

Titleā€ƒ 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 get updated as per the event behavior configured. To learn more about event behavior and configuring event behavior, see What is event behavior.


Illustration

Apply Event Behaviors tool illustration

Usage


Syntax

Parameter Explanation
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.

Code Samples

ApplyEventBehaviors example 1 (stand-alone script)

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


# Name: ApplyEventBehaviors.py
# Description: Processes event behaviors for events impacted by edits to the LRS Network.
# Requirements: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Tool variables
network = "C:/Data/UPDM.gdb/P_StationSeriesNetwork"

# Process: Update Event Locations
arcpy.ApplyEventBehaviors_locref(network)

                    

ApplyEventBehaviors example 2 (Python window)

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


# tool variables
in_route_features = "Station_Series_Network"

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

# execute the tool
arcpy.ApplyEventBehaviors_locref(in_route_features)

                    

ApplyEventBehaviors example 3 (stand-alone script)

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


# Name: ApplyEventBehaviors_Pro_Ex3.py
# Description: This script demonstrates ho to use apply event behaviors in standalone mode using a feature service. It is recommended to work in a version and post it into  the default version.
# Requires: LocationReferencing license

# 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"


# Process : ApplyEventBehaviors.
arcpy.ApplyEventBehaviors_locref(in_network_layer)


                    

Tags

Credits

Use limitations