# Name: Modify_LRS_Intersection_ex1.py
# Description: Modifies an existing LRS Intersection feature class.
# Requires: ArcGIS Location Referencing license
# Check out license
arcpy.CheckOutExtension("LocationReferencing")
# Tool variables
in_feature_class = r"C:\ArcGIS\Projects\Demo1\Demo\Demo.gdb\LRS\Intersection"
intersection_id_field = "IntersectionId"
intersection_name_field = "IntersectionName"
route_id_field = "RouteId"
feature_id_field = "featureId"
feature_class_name_field = "featureClassName"
from_date_field = "FromDate"
to_date_field = "ToDate"
intersecting_layers = "[{LineNetwork, RouteId, RouteId, & RouteId:}]"
measure_field = "Measure"
# Set current workspace
arcpy.env.workspace = "C:\ArcGIS\Projects\Demo1\Demo\Demo.gdb"
# Execute the tool
arcpy.locref.ModifyLRSIntersection(in_feature_class, intersection_id_field, intersection_name_field,
route_id_field, feature_id_field, feature_class_name_field, from_date_field,
to_date_field, intersecting_layers, measure_field)
# Check in license
arcpy.CheckInExtension('LocationReferencing')