AnsweredAssumed Answered

How can I get Raster Layers to the right folder using python/ModelBuilder?

Question asked by epsimpson on Jun 15, 2012
Latest reply on Jun 19, 2012 by epsimpson
I have automated a series of map making steps to generate and display 4 desired layers in ArcMap 10.0.  Everything ???works??? and displays in ArcMap, but in the List By Source view my raster layer displays as sourced in:


I built the tool in ModelBuilder originally and it displayed the same behavior.  When performing the steps by hand all 4 layers are listed within the same file GDB, and that is the desired behavior. 

Here is the Python code segment used to generate the raster layer:

    # Process: Natural Neighbor     outpath = Output_GDB     arcpy.env.workspace = outpath, pmname, v_raster )     v_raster = os.path.join(outpath, v_raster)      # Process: Make Raster Layer     outpath = Output_GDB     arcpy.env.workspace = outpath     arcpy.MakeRasterLayer_management(v_raster, v_conc)      arcpy.SetParameterAsText(6, v_conc)

I know MakeRasterLayer generates a virtual layer, which will be saved when the .mxd file gets saved, but I thought it would point to the raster in the Natural Neighbor step, which resides in Output_GDB, since that is the behavior of MakeFeatureLayer.  We don't want anything stored on local drives, and we certainly don't want anything sent to Temp directories.

What am I missing to get my Raster Layer in the right place on the TOC?