Skip To Content

Enable Referent Fields

Summary

Enables or modifies the referent fields so that you can manage referent information for the registered LRS event. It also support modifying the existing referent fields.

For more information, see Storing referent and offset information for event location.

Usage

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

    For information about field type and length, see Storing Referent Location with events.

  • 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 geoprocessing tool.

Syntax

EnableReferentFields_locref (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})
ParameterExplanationData Type
in_feature_class

The feature class 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)

The offset units. Feet is the default.

  • CENTIMETERSCentimeters is the offset unit.
  • DECIMETERSDecimeters is the offset unit.
  • FEETFeet is the offset unit.
  • INCHESInches is the offset unit.
  • KILOMETERSKilometers is the offset unit.
  • METERSMeters is the offset unit.
  • MILESMiles is the offset unit.
  • MILLIMETERSMillimeters is the offset unit.
  • YARDSYards is the offset unit.
String

Code sample

EnableReferentFields example 1 (Python window)

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

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

# Call the tool
arcpy.EnableReferentFields_locref(inputEventFC, fromReferentMethodField, fromReferentLocationField,
                                  fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
                                  toReferentOffsetField, offsetUnit)
EnableReferentFields example 2 (stand-alone script)

The following stand-alone Python script demonstrates how to use the EnableReferentFields tool to enables 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 any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

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

# execute the tool
arcpy.EnableReferentFields_locref(inputEventFC, fromReferentMethodField, fromReferentLocationField,
                                  fromReferentOffsetField, toReferentMethodField, toReferentLocationField,
                                  toReferentOffsetField, offsetUnit)
EnableReferentFields example 3 (stand-alone script)

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

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

# Import arcpy module
import arcpy

# check out any necessary licenses
arcpy.CheckOutExtension("LocationReferencing")

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

# execute the tool
arcpy.EnableReferentFields_locref(inputEventFC, '' , '' , '' , toReferentMethodField, toReferentLocationField, toReferentOffsetField)

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • ArcGIS Desktop Basic: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Standard: Requires ArcGIS Pipeline Referencing
  • ArcGIS Desktop Advanced: Requires ArcGIS Pipeline Referencing

Related topics