arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, {geometry_type}, {to_measure_field}, {from_date_field}, {to_date_field}, {event_spans_routes}, {to_route_id_field}, {store_route_name}, {route_name_field}, {to_route_name_field}, {calibrate_rule}, {retire_rule}, {extend_rule}, {reassign_rule}, {realign_rule}, {reverse_rule}, {carto_realign_rule})
|
Name
|
Explanation
|
Data type
|
|
in_event
|
The external event feature class or table that will be registered to an LRS.
|
Table View
|
|
parent_network
|
The LRS Network to which the event will be registered.
|
Feature Layer
|
|
event_name
|
The name of the external event or table that will be registered to the LRS.
|
String
|
|
event_id_field
|
The event ID field available in the event feature class or table.
|
Field
|
|
route_id_field
|
The name of the route ID field if it is a point event or a line event that does not span routes, or the name of the from route ID field if the event spans routes. The field must be available in the external event table or feature class.
|
Field
|
|
measure_field
|
The name of the measure field if it is a point event or the name of the from measure field if it is a line event.
|
Field
|
|
geometry_type
(Optional)
|
Specifies the geometry type of the external event or table.
|
String
|
|
to_measure_field
(Optional)
|
The name of the to measure field. This field is only required for line events.
|
Field
|
|
from_date_field
(Optional)
|
The from date field in the event feature class or table.
|
Field
|
|
to_date_field
(Optional)
|
The to date field in the event feature class or table.
|
Field
|
|
event_spans_routes
(Optional)
|
Specifies whether the event records will span routes.
AS_IS—The property will not change. This is the default.
NO_SPANS_ROUTES—The event records will not span routes. This is applicable to line events only.
SPANS_ROUTES—The event records will span routes. This is applicable to line events only.
|
String
|
|
to_route_id_field
(Optional)
|
The name of the to route ID field available in the event feature class or table.
|
Field
|
|
store_route_name
(Optional)
|
Specifies whether the route name will be stored with the event records.
AS_IS—The property will not change. This is the default.
NO_STORE_ROUTE_NAME—The route name will not be stored with the event records.
STORE_ROUTE_NAME—The route name will be stored with the event records.
|
String
|
|
route_name_field
(Optional)
|
The route name field if it is a point event or line event that does not span routes, or the name of the from route name field if the event spans routes. The field must be available in the external event table or feature class.
|
Field
|
|
to_route_name_field
(Optional)
|
The to route name field for line events that span routes. This parameter is required if the store_route_name and event_spans_routes parameters are set.
|
Field
|
|
calibrate_rule
(Optional)
|
Specifies the event behavior rule for the calibrate activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
|
String
|
|
retire_rule
(Optional)
|
Specifies the event behavior rule for the retire activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
|
String
|
|
extend_rule
(Optional)
|
Specifies the event behavior rule for the extend activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
COVER—The geometric location and measure of a line event will be modified to include a new or newly modified section.
|
String
|
|
reassign_rule
(Optional)
|
Specifies the event behavior rule for the reassign activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
|
String
|
|
realign_rule
(Optional)
|
Specifies the event behavior rule for the realign activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
SNAP—The geographic location of the event will be preserved by snapping the event to a concurrent route; measures may change.
COVER—The geometric location and measure of a line event will be modified to include a new or newly modified section.
|
String
|
|
reverse_rule
(Optional)
|
Specifies the event behavior rule for the reverse activity.
STAY_PUT—The geographic location of the event will be preserved; measures may change. This is the default.
RETIRE—Both measure and geographic location will be preserved; the event will be retired.
MOVE—The measures of the event will be preserved; the geographic location may change.
|
String
|
|
carto_realign_rule
(Optional)
|
Specifies the event behavior rule for the cartographic realign activity.
HONOR_ROUTE_MEASURE—The measure of the event will be preserved or changed proportionally to the route's measure change. This is the default.
|
String
|
Derived output
|
Name
|
Explanation
|
Data type
|
|
out_external_event_table
|
The updated external event table.
|
Table
|
Code sample
ConfigureExternalEventWithLRS example 1 (Python window)
The following script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external point event in the Python window.
# Name: Configure_Externalevent_LRS_ex1.py
# Description: Configure an external point event in an LRS Network in the Python window.
# Requires: ArcGIS Location Referencing
# Tool variables
in_event = "C:\\Eventdata.sde\\pointevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "PointEvent"
event_id_field = "EventId"
route_id_field = "RouteId"
measure_field = "Measure"
geometry_type = "POINT"
to_measure_field = None
from_date_field = "FromDate"
to_date_field = "ToDate"
event_spans_routes = "AS_IS"
to_route_id_field = None
store_route_name = "AS_IS"
route_name_field = None
to_route_name_field = None
calibrate_rule = "STAY_PUT"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"
# run the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)
ConfigureExternalEventWithLRS example 2 (Python window)
The following script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external line event in the Python window.
# Name: Configure_Externalevent_LRS_ex2.py
# Description: Configure an external line event in an LRS Network in the Python window.
# Requires: ArcGIS Location Referencing
# Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineEvent"
event_id_field = "EventId"
route_id_field = "RouteId"
measure_field = "FromMeasure"
geometry_type = "LINE"
to_measure_field = "ToMeasure"
from_date_field = "FromDate"
to_date_field = "ToDate"
event_spans_routes = "AS_IS"
to_route_id_field = None
store_route_name = "STORE ROUTE NAME"
route_name_field = "RouteName"
to_route_name_field = None
calibrate_rule = "STAY_PUT"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"
# Run the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)
ConfigureExternalEventWithLRS example 3 (Python window)
The following script demonstrates how to use the ConfigureExternalEventWithLRS function to modify an existing external line event in the Python window.
# Name: Configure_Externalevent_LRS_ex3.py
# Description: Modify an existing external line event in an LRS Network in the Python window. Event name and optional parameter fields are updated.
# Requires: ArcGIS Location Referencing
# Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineEvent_updated"
event_id_field = "EventId_updated"
route_id_field = "RouteId_updated"
measure_field = "FromMeasure_updated"
geometry_type = "LINE"
to_measure_field = "ToMeasure_updated"
from_date_field = "FromDate_updated"
to_date_field = "ToDate_updated"
event_spans_routes = "AS_IS"
to_route_id_field = None
store_route_name = "STORE_ROUTE_NAME"
route_name_field = "FromRouteName_updated"
to_route_name_field = None
calibrate_rule = "RETIRE"
retire_rule = "RETIRE"
extend_rule = "RETIRE"
reassign_rule = "RETIRE"
realign_rule = "RETIRE"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"
# Run the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)
ConfigureExternalEventWithLRS example 4 (stand-alone script)
The following stand-alone script demonstrates how to use the ConfigureExternalEventWithLRS function to configure an external line event spanning routes in an LRS Network.
# Name: Configure_Externalevent_LRS_ex4.py
# Description: Configure an external line event spanning routes in an LRS Network using a stand-alone Python script.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineSpanningEvent"
event_id_field = "EventId"
route_id_field = "FromRouteId"
measure_field = "FromMeasure"
geometry_type = "LINE"
to_measure_field = "ToMeasure"
from_date_field = "FromDate"
to_date_field = "ToDate"
event_spans_routes = "SPANS ROUTES"
to_route_id_field = "ToRouteId"
store_route_name = "STORE ROUTE NAME"
route_name_field = "FromRouteName"
to_route_name_field = "ToRouteName"
calibrate_rule = "STAY_PUT"
retire_rule = "STAY_PUT"
extend_rule = "STAY_PUT"
reassign_rule = "STAY_PUT"
realign_rule = "STAY_PUT"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"
# Run the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)
ConfigureExternalEventWithLRS example 5 (stand-alone script)
The following stand-alone script demonstrates how to use the ConfigureExternalEventWithLRS function to modify an existing external line event spanning routes in an LRS Network.
# Name: Configure_Externalevent_LRS_ex5.py
# Description: Modify an existing external line event spanning routes of an LRS Network using a stand-alone Python script. Event name and optional parameter fields are updated.
# Requires: ArcGIS Location Referencing
# Import arcpy module
import arcpy
# Tool variables
in_event = "C:\\Eventdata.sde\\lineevent"
parent_network = "C:\\Networkdata.sde\\Network1"
event_name = "LineSpanningEvent_updated"
event_id_field = "EventId_updated"
route_id_field = "FromRouteId_updated"
measure_field = "FromMeasure_updated"
geometry_type = "LINE"
to_measure_field = "ToMeasure_updated"
from_date_field = "FromDate_updated"
to_date_field = "ToDate_updated"
event_spans_routes = "SPANS ROUTES"
to_route_id_field = "ToRouteId_updated"
store_route_name = "STORE ROUTE NAME"
route_name_field = "FromRouteName_updated"
to_route_name_field = "ToRouteName_updated"
calibrate_rule = "RETIRE"
retire_rule = "RETIRE"
extend_rule = "RETIRE"
reassign_rule = "RETIRE"
realign_rule = "RETIRE"
reverse_rule = "STAY_PUT"
carto_realign_rule = "HONOR_ROUTE_MEASURE"
# Set current workspace
arcpy.env.workspace = "C:\\Networkdata.sde"
# Run the tool
arcpy.locref.ConfigureExternalEventWithLRS(in_event, parent_network, event_name, event_id_field, route_id_field, measure_field, geometry_type, to_measure_field, from_date_field, to_date_field, event_spans_routes, to_route_id_field, store_route_name, route_name_field, to_route_name_field, calibrate_rule, retire_rule, extend_rule, reassign_rule, realign_rule, reverse_rule, carto_realign_rule)