Disable Derived Measure Fields (Location Referencing)

Сводка

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.

Использование

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

Синтаксис

arcpy.locref.DisableDerivedMeasureFields(in_feature_class)
ParameterОбъяснениеТип данных
in_feature_class

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

Feature Layer

Производные выходные данные

NameОбъяснениеТип данных
out_feature_class

The updated feature layer for the event.

Feature Layer

Пример кода

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: Disable fields that store the derived network route id, route name and measure fields.
# Requires: ArcGIS Location Referencing

# Check out license
arcpy.checkOutExtension("LocationReferencing")

# 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\LRS\EventFeatureClass"

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

# Execute the tool
arcpy.DisableDerivedMeasureFields_locref(in_feature_class)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
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: Disable fields that store the derived network route id, route name and measure fields.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

# Check out license
arcpy.checkOutExtension("LocationReferencing")

# Local variables:
in_feature_class = r"c:\DisableDerivedMeasureFields\Py\APR.gdb\LRS\EventFeatureClass"

# Execute the tool
arcpy.DisableDerivedMeasureFields_locref(in_feature_class)

# Check in license
arcpy.CheckInExtension('LocationReferencing')

Environments

Этот инструмент не использует параметры среды геообработки

Информация о лицензиях

  • Basic: Требуется ArcGIS Location Referencing
  • Standard: Требуется ArcGIS Location Referencing
  • Advanced: Требуется ArcGIS Location Referencing

Связанные разделы