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.

参数

标注说明数据类型
LRS Event Feature Class

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

Feature Layer

派生输出

标注说明数据类型
Updated Input Feature Class

The updated feature layer for the event.

Feature Layer

arcpy.locref.DisableDerivedMeasureFields(in_feature_class)
名称说明数据类型
in_feature_class

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

Feature Layer

派生输出

名称说明数据类型
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")

# 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')

环境

此工具不使用任何地理处理环境。

许可信息

  • Basic: 需要 ArcGIS Location Referencing
  • Standard: 需要 ArcGIS Location Referencing
  • Advanced: 需要 ArcGIS Location Referencing

相关主题