Hi, 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 -*-
# ---------------------------------------------------------------------------
# Snippet.py
# Created on: 2018-07-17 11:14:47.00000
# (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------
# Import arcpy module
import arcpy
from arcpy.sa import *
from arcpy.ddd import *
arcpy.CheckOutExtension("Spatial")
arcpy.CheckOutExtension("3D")
# 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")
arcpy.CheckInExtension("Spatial")
arcpy.CheckInExtension("3D") Runtime error Traceback (most recent call last): File "", line 27, in File "c:\program files (x86)\arcgis\desktop10.4\arcpy\arcpy\cartography.py", 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).
... View more