dougcurl

LocateFeaturesAlongRoutes produces empty table

Discussion created by dougcurl on Nov 16, 2012
Latest reply on Nov 19, 2012 by dougcurl
I've built a pretty simple geoprocessing model that uses the Linear Referencing "Locate Features Along Routes" tool, and the model outputs a table just fine when run within ArcCatalog to get a result for publishing. But when I publish the tool to ArcGIS Server and run it through the rest directory (http://128.163.2.68/arcgis/rest/services/testPtsTableOutput/GPServer), the output table just results in having the field names with no data. I'm fairly new to publishing these models, but I've tried this many different ways with the same result. My input route seems to be okay, and I get no errors in any logs. The output code from the model I'm using is below. Any help is appreciated. I'm starting to think this is a bug, but everyone probably thinks that about their issue!

# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# printBoreholeTableVals.py
# Created on: 2012-11-16 15:38:26.00000
#   (generated by ArcGIS/ModelBuilder)
# Usage: printBoreholeTableVals <coal_borehole> <input_line> <rtFeatures> <coal_borehole_LocateFeatures1_Events> 
# Description: 
# Allows users to find points along a drawn route and output to a table
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("//serverIP/BladeShare/arcgisserver/DougTools.tbx")

# Script arguments
coal_borehole = arcpy.GetParameterAsText(0)
if coal_borehole == '#' or not coal_borehole:
    coal_borehole = "<omitted>\\test.gdb\\coal_borehole" # provide a default value if unspecified

input_line = arcpy.GetParameterAsText(1)
if input_line == '#' or not input_line:
    input_line = "<omitted>\\BoreholeXSections.gdb\\Line1_11_12_12" # provide a default value if unspecified

rtFeatures = arcpy.GetParameterAsText(2)

coal_borehole_LocateFeatures1_Events = arcpy.GetParameterAsText(3)
if coal_borehole_LocateFeatures1_Events == '#' or not coal_borehole_LocateFeatures1_Events:
    coal_borehole_LocateFeatures1_Events = "coal_borehole_LocateFeatures1 Events" # provide a default value if unspecified

# Local variables:
Output_Event_Table_Properties = coal_borehole
Line1_11_12_12_CreateRoutes = input_line

# Process: Create Routes
arcpy.CreateRoutes_DougTools(input_line, "Name", Line1_11_12_12_CreateRoutes, "LENGTH", "", "", "UPPER_LEFT", "1", "0", "IGNORE", "INDEX")

# Process: Locate Features Along Routes
arcpy.LocateFeaturesAlongRoutes_DougTools(coal_borehole, Line1_11_12_12_CreateRoutes, "Name", "500 Feet", rtFeatures, Output_Event_Table_Properties, "FIRST", "DISTANCE", "ZERO", "FIELDS", "M_DIRECTON")

Outcomes