Enable Referent Fields (Location Referencing)

Summary

Enables or modifies the referent fields so that you can manage referent information for the registered LRS event.

Learn more about event referent fields

Usage

  • The tool enables the referent fields by allowing you to register the existing fields as the referent fields.

  • If referent fields are already enabled, then by default, the tool will populate the existing fields so that they can be modified.

  • The existing data in the referent fields is not validated or updated when you enable or modify the referent fields.

  • To disable the referent fields, use the Disable Referent Fields tool.

Parameters

LabelExplanationData Type
Event Feature Class

The feature class that will be used for the LRS event.

Feature Layer
Referent Method Field
(Optional)

The From referent method field.

Field
Referent Location Field
(Optional)

The From referent location field.

Field
Referent Offset Field
(Optional)

The From referent offset field.

Field
To Referent Method Field
(Optional)

The To referent method field.

Field
To Referent Location Field
(Optional)

The To referent location field.

Field
To Referent Offset Field
(Optional)

The To referent offset field.

Field
Offset Units
(Optional)

Specifies the offset units that will be used.

  • Miles (US Survey)The unit of measure will be miles. This is the default.
  • Inches (US Survey)The unit of measure will be inches.
  • Feet (US Survey)The unit of measure will be feet.
  • Yards (US Survey)The unit of measure will be yards.
  • Nautical miles (US Survey)The unit of measure will be nautical miles.
  • Feet (International)The unit of measure will be international feet.
  • MillimetersThe unit of measure will be millimeters.
  • CentimetersThe unit of measure will be centimeters
  • MetersThe unit of measure will be meters.
  • KilometersThe unit of measure will be kilometers.
  • DecimetersThe unit of measure will be decimeters.
String

Derived Output

LabelExplanationData Type
Output Event Feature Class

The updated event feature layer.

Feature Layer

arcpy.locref.EnableReferentFields(in_feature_class, {from_referent_method_field}, {from_referent_location_field}, {from_referent_offset_field}, {to_referent_method_field}, {to_referent_location_field}, {to_referent_offset_field}, {offset_units})
NameExplanationData Type
in_feature_class

The feature class that will be used for the LRS event.

Feature Layer
from_referent_method_field
(Optional)

The From referent method field.

Field
from_referent_location_field
(Optional)

The From referent location field.

Field
from_referent_offset_field
(Optional)

The From referent offset field.

Field
to_referent_method_field
(Optional)

The To referent method field.

Field
to_referent_location_field
(Optional)

The To referent location field.

Field
to_referent_offset_field
(Optional)

The To referent offset field.

Field
offset_units
(Optional)

Specifies the offset units that will be used.

  • MILESThe unit of measure will be miles. This is the default.
  • INCHESThe unit of measure will be inches.
  • FEETThe unit of measure will be feet.
  • YARDSThe unit of measure will be yards.
  • NAUTICAL_MILESThe unit of measure will be nautical miles.
  • INTFEETThe unit of measure will be international feet.
  • MILLIMETERSThe unit of measure will be millimeters.
  • CENTIMETERSThe unit of measure will be centimeters
  • METERSThe unit of measure will be meters.
  • KILOMETERSThe unit of measure will be kilometers.
  • DECIMETERSThe unit of measure will be decimeters.
String

Derived Output

NameExplanationData Type
out_feature_class

The updated event feature layer.

Feature Layer

Code sample

EnableReferentFields example 1 (Python window)

The following Python window script demonstrates how to use the EnableReferentFields function in immediate mode to enable referent fields for an existing LRS event.

# Name: Enable_Referent_Fields_ex1.py
# Description: Enable referent fields for an existing LRS Event that already has referent fields configured.
# Requires: ArcGIS Location Referencing

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

# Local variables:
inputEventFC = r"c:\EnableReferent\Py\EnableReferent.gdb\LRS"
fromReferentMethodField = 'FromRefMethod'
fromReferentLocationField = 'FromRefLocation'
fromReferentOffsetField = 'FromRefOffset'
toReferentMethodField = 'ToRefMethod'
toReferentLocationField = 'ToRefLocation'
toReferentOffsetField = 'ToRefOffset'
offsetUnit = 'FEET'

# Execute the tool
arcpy.locref.EnableReferentFields(inputEventFC, fromReferentMethodField, fromReferentLocationField,
                                  fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
                                  toReferentOffsetField, offsetUnit)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
EnableReferentFields example 2 (stand-alone script)

The following stand-alone Python script demonstrates how to use the EnableReferentFields function to enable referent fields for an existing LRS event.

# Name: Enable_Referent_Fields_ex2.py
# Description: Enables referent fields for an existing LRS Event.
# Requires: ArcGIS Pipeline Referencing

# Import arcpy module
import arcpy

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

# Local variables
inputEventFC = "c:\EnableReferent\Py\EnableReferent.gdb\LRS"
fromReferentMethodField = 'FromRefMethod'
fromReferentLocationField = 'FromRefLocation'
fromReferentOffsetField = 'FromRefOffset'
toReferentMethodField = 'ToRefMethod'
toReferentLocationField = 'ToRefLocation'
toReferentOffsetField = 'ToRefOffset'
offsetUnit = 'FEET'

# execute the tool
arcpy.locref.EnableReferentFields(inputEventFC, fromReferentMethodField, fromReferentLocationField,
                                  fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
                                  toReferentOffsetField, offsetUnit)

# Check in license
arcpy.CheckInExtension('LocationReferencing')
EnableReferentFields example 3 (stand-alone script)

The following stand-alone Python script demonstrates how to use the EnableReferentFields function to modify referent fields for an existing LRS event that already has configured referent fields.

# Name: Enable_Referent_Fields_ex3.py
# Description: Modifies  referent fields for an existing LRS Event that already has referent fields configured.
# Requires: ArcGIS Location Referencing

# Import arcpy module
import arcpy

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

# Local variables:
inputEventFC = r"c:\EnableReferent\Py\EnableReferent.gdb\LRS"
toReferentMethodField = 'ToRefMethod2'
toReferentLocationField = 'ToRefLocation2'
toReferentOffsetField = 'ToRefOffset2'

# Execute the tool
arcpy.locref.EnableReferentFields(inputEventFC, '' , '' , '' , toReferentMethodField, toReferentLocationField, toReferentOffsetField)

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

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Standard: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)
  • Advanced: Requires ArcGIS Location Referencing (ArcGIS Pipeline Referencing or ArcGIS Roads and Highways)

Related topics