AnsweredAssumed Answered

Flow Path Parameters from 2D Line Python Error

Question asked by toby17 on Feb 9, 2015
Latest reply on Feb 9, 2015 by toby17

I am trying to run a python script in PythonWin that first creates the longest flow path for subwatersheds then computes the flow path parameters from 2D line.  I keep getting a error of "Object reference not set to an instance of an object" for the Flow Path Parameters from 2D line part of the script.  Here is my code, wondering if I'm missing something?  I'm using ArcMap 10.1 and Feb. 2014 ArcHydro release.


# Import arcpy module
import arcpy
import ArcHydroTools
from import *
arcpy.env.overwriteOutput = True


# Local variables:
ned10m = "L:\\srbcgis\\Projects\\Cumulative_Impacts\\Data\\Availability_Data\\ned10m"
Wshedtest = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Wshedtest"
WshedtestPt = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\WshedtestPt"
Catchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\Catchment"
LFPCatchment = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LFPCatchment"
fdrlake = "C:\\CWUAS\\Rasters\\CWUAS\\fdrlake"
LongestFlowPath = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\LongestFlowPath"
PTSLP_GP = "C:\\CWUAS\\cwuas_10m.gdb\\CWUAS\\PTSLP_GP"


# Process: Longest Flow Path for Subwatersheds
ArcHydroTools.LongestFlowPathForSubwatersheds(Wshedtest, WshedtestPt, Catchment, LFPCatchment, fdrlake, LongestFlowPath)


# Process: Flow Path Parameters from 2D Line
ArcHydroTools.FlowPathParametersFrom2DLine(LongestFlowPath, ned10m, PTSLP_GP)