AnsweredAssumed Answered

Error When Using in_memory to Process Polyline Features

Question asked by mwiecek_RRCGIS on Jul 18, 2018
Latest reply on Jul 19, 2018 by bixb0012



I'm trying to run a script that will generate a contour map from a raster in a geodatabase, run Simplify Line on the contour map, and then run Smooth Line. At first I ran it in disk, and it worked (albeit slowly), and now I'd like to do it using the in_memory workspace. However, it returns the error message at the bottom. I've tried this in PyScripter and ArcMap with both foreground and background (64-bit) geoprocessing, and the result is the same. What is the problem with my code that is causing this to fail when I use the in_memory workspace?

# -*- coding: utf-8 -*-
# ---------------------------------------------------------------------------
# Created on: 2018-07-17 11:14:47.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy
from import *
from arcpy.ddd import *

# Local variables:
FilteredDEM = "D:\\ArcGIS\\FloodMapGenerator\\FloodMapGenerator.gdb\\FilteredDEM"
FiveMeterContour = "in_memory\\FiveMeterContour"
FiveMeterSimplify_Pnt = FiveMeterContour
FiveMeterSimplify = "in_memory\\FiveMeterSimplify"
FiveMeterSmooth = "in_memory\\FiveMeterSmooth"

# Process: Contour
arcpy.Contour_3d(FilteredDEM, FiveMeterContour, "5", "0", "1")

# Process: Simplify Line
arcpy.SimplifyLine_cartography(FiveMeterContour, FiveMeterSimplify, "BEND_SIMPLIFY", "5 Meters", collapsed_point_option = "NO_KEEP", error_checking_option = "NO_CHECK")

# Process: Smooth Line
arcpy.SmoothLine_cartography(FiveMeterSimplify, FiveMeterSmooth, "BEZIER_INTERPOLATION", "0 Meters", "FIXED_CLOSED_ENDPOINT", "NO_CHECK")






Runtime error Traceback (most recent call last): File "", line 27, in File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\", line 1340, in SimplifyLine raise e ExecuteError: ERROR 000207: Cannot create intermediate output GPInMemoryWorkspace:{5568791D-08F7-4A36-BC5F-A640D3D64572}\FiveMeterSimplify_TmpIn Failed to execute (SimplifyLine).