# Name: Create_LRS_Intersection_ex1.py
# Description: Create a new LRS Intersection registered to an LRS Network in the Python window.
# Requires: ArcGIS Location Referencing
# Check out license
arcpy.CheckOutExtension("LocationReferencing")
# Local variables
parent_network = r"C:\Demo.gdb\LRS\Network1"
network_description_field = "RouteName"
intersection_feature_class_name = "Intersection"
intersecting_layers = "[{Boundary, CountyName, CountyID, & County:}]"
# Set current workspace
arcpy.env.workspace = "C:\Demo.gdb"
# Execute the tool
arcpy.locref.CreateLRSIntersection(parent_network, network_description_field, intersection_feature_class_name, intersecting_layers)
# Check in license
arcpy.CheckInExtension("LocationReferencing")