Skip To Content

Disable Derived Measure Fields

Summary

Disables fields that store the derived network route ID, route name, and measure fields.

This tool doesn't delete the derived measure fields; it only removes the derived measure fields' information from the Lrs_Metadata table.

Usage

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

Syntax

DisableDerivedMeasureFields(in_feature_class)
ParameterExplanationData Type
in_feature_class

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

Feature Layer

Derived Output

NameExplanationData Type
out_feature_class

The updated feature layer for the event.

Feature Layer

Code sample

DisableDerivedMeasureFields example 1 (Python window)

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

# Name: DisableDerivedMeasureFields_ex1.py
# Description: Demonstrates how to use the DisableDerivedMeasureFields 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 = r"c:\DisableDerivedMeasureFields\Py\APR.gdb\EventFeatureClass"

# set current workspace
arcpy.env.workspace = r"c:\DisableDerivedMeasureFields\Py\APR.gdb\EventFeatureClass"

# execute the tool
arcpy.DisableDerivedMeasureFields_locref(in_feature_class)
DisableDerivedMeasureFields example 2 (stand-alone script)

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

# Name: DisableDerivedMeasureFields_ex2.py
# Description: Disables fields that 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:\DisableDerivedMeasureFields\Py\APR.gdb\EventFeatureClass"

# execute the tool
arcpy.DisableDerivedMeasureFields_locref(in_feature_class)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics