Skip To Content

Enable Derived Measure Fields

Zusammenfassung

Enables fields to store the derived route ID, derived route name, and derived measure fields for the specified LRS event feature class.

Verwendung

  • The fields that will store the derived route ID, derived route name, and derived measure fields need to be available prior to running this tool.

  • You can use an empty event feature class or event feature class that has loaded records.

Syntax

EnableDerivedMeasureFields(in_feature_class, {derived_route_id_field}, {derived_route_name_field}, {derived_from_measure_field}, {derived_to_measure_field})
ParameterErklärungDatentyp
in_feature_class

An existing event feature class or feature layer that is registered to an LRS.

Feature Layer
derived_route_id_field
(optional)

The derived route ID field.

Field
derived_route_name_field
(optional)

The derived route name field.

Field
derived_from_measure_field
(optional)

The derived from measure field.

Field
derived_to_measure_field
(optional)

The derived to measure field.

Field

Abgeleitete Ausgabe

NameErklärungDatentyp
out_feature_class

The updated feature layer for the event.

Feature Layer

Codebeispiel

EnableDerivedMeasureFields example 1 (Python window)

The following Python window script demonstrates how to use the EnableDerivedMeasureFields tool in immediate mode.

# Name: EnableDerivedMeasureFields_ex1.py
# Description: Demonstrates how to use the EnableDerivedMeasureFields tool in immediate mode.
# Requires: ArcGIS Pipeline Referencing

# import Location Referencing toolbox
arcpy.ImportToolbox("C:/Program Files/ArcGIS/Pro/Resources/ArcToolBox/Toolboxes/Location Referencing Tools.tbx")

# tool variables 
in_feature_class = "c:\\APR.gdb\\LineEventFeatureClass"
Derived_route_id_field = "DerivedRouteId"
Derived_route_name_field = "DerivedRouteName"
Derived_from_Measure_field = "DerivedFromMeasure"
Derived_to_Measure_field = "DerivedToMeasure"

# set current workspace
arcpy.env.workspace = "c:\\EnableDerivedMeasureFields\\Py\\APR.gdb\\LineEventFeatureClass"

# execute the tool
arcpy.EnableDerivedMeasureFields_locref(in_feature_class, Derived_route_id_field, Derived_route_name_field, Derived_from_Measure_field, Derived_to_Measure_field)
EnableDerivedMeasureFields example 2 (stand-alone script)

The following script demonstrates how to use the EnableDerivedMeasureFields tool in a stand-alone Python script.

# Name: EnableDerivedMeasureFields_ex2.py
# Description: Enables fields to store the derived network route id, route name and measure fields.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Local variables:
in_feature_class = r"c:\EnableDerivedMeasureFields\Py\APR.gdb\LineEventFeatureClass"
Derived_route_id_field = "DerivedRouteId"
Derived_route_name_field = "DerivedRouteName"
Derived_from_Measure_field = "DerivedFromMeasure"
Derived_to_Measure_field = "DerivedToMeasure"

# execute the tool
arcpy.EnableDerivedMeasureFields_locref(in_feature_class, Derived_route_id_field, Derived_route_name_field, Derived_from_Measure_field, Derived_to_Measure_field)

Umgebungen

Dieses Werkzeug verwendet keine Geoverarbeitungsumgebungen.

Lizenzinformationen

  • Basic: Erfordert ArcGIS Location Referencing
  • Standard: Erfordert ArcGIS Location Referencing
  • Advanced: Erfordert ArcGIS Location Referencing

Verwandte Themen