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