Generate Events (Location Referencing)

Titleā€ƒ Generate Events (Location Referencing)

Summary

Re-creates shapes for event features registered with an LRS Network.


Usage


Syntax

Parameter Explanation
in_event_layer

The event for which shapes will be regenerated.

Code Samples

GenerateEvents example 1 (Python window)

The following Python window script demonstrates how to use GenerateEvents in immediate mode.


# tool variables 
in_event_layer = "Event"

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

# execute the tool 
arcpy.UpdateEventShapes_locref(in_event_layer)

                    

GenerateEvents example 2 (stand-alone script)

The following Python script demonstrates how to use GenerateEvents in a stand-alone Python script.


# Name: GenerateEvents_Ex2.py 
# Description: Re-creates shapes for event features registered with a LRS Network 
# Requirements: ArcGIS Pipeline Referencing
# Import arcpy module 
import arcpy 
# Check out any necessary licenses 
arcpy.CheckOutExtension("LocationReferencing")
# Local variables 
# input Network layer 
in_event_layer = "C:\\Data\Sample.gdb\\SpeedLimit" 
# Process: Generate Events
arcpy.GenerateEvents_locref(in_event_layer)

                    

GenerateEvents example 3 (stand-alone script)

The following Python script demonstrates how to use GenerateEvents in a stand-alone Python script in a feature service.


# Name: GenerateEvents_Pro_Ex3.py
# Description: This script demonstrates how to generate events in stand alone 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 event is in feature service.  Signing in portal is required to access the feature service.
arcpy.SignInToPortal('https://yourdomain.com/portal', 'username', 'password')

## Map the input event from the feature service. Here, 3 corresponds to the input event.
in_event_layer = r"https://yourdomain.com/server/rest/services/FeatureServiceName/FeatureServer/3"


# Process : Generate Events.
arcpy.GenerateEvents_locref(in_event_layer)

                    

Tags

Credits

Use limitations