SingleOutputMapAlgebra_sa "succeeds", but no output

1309
13
06-04-2013 08:00 AM
LeeBenda
New Contributor
The same code works great on all of our computers, except one.  It runs SingleOutputMapAlgebra_sa from a VB-scripted Add-In, and throws an error.  I can find it in the ArcToolbox Results, and I can run it again from that prompt, where it says "Succeeded, elapsed time 0.0 seconds", and the output file does not exist.

I just went to the trouble to uninstall and reinstall ArcMap and Spatial Analyst, and it behaves exactly the same.

When I run Raster Calculator from ArcToolbox with the exact same input, it works. 

Any clue?
0 Kudos
13 Replies
LeeBenda
New Contributor
No, the .flt files are no different than they've ever been.
0 Kudos
LeeBenda
New Contributor
We're going to try a system restore to sometime last week on the offending machine.  Maybe there was a Windows update or something that screwed things up.
0 Kudos
KevinAndras
New Contributor II
This just happened to a second computer in our office.  (I'm the same guy who posted all of the above, just different log-in.)  I had a batch run to do this operation for 7 grids - the first one worked fine, and the next 6 all failed in the exact same mode as the other computer.  Using ArcToolbox Raster calculator to do the operation works, but using SingleOutputMapAlgebra says it works, 0.0 seconds, no output.  Ack.  Any more suggestions, or a potential work-around?

Thanks!
0 Kudos
KevinAndras
New Contributor II
OK, I figured it out.  ArcMap was failing to save rasters (it was trying to write to C:\Windows\System32\!), so I set up (as described in another forum topic on this site) a Windows environment variable ARCTMPDIR as C:\Windows\Temp\.

Here's how I figured out what was happening: When I opened up the SingleOutput interface (that says it succeeded but didn't), I replaced the .flt grids with an actual ESRI grid in the expression, and then I got some real errors:

Messages
Executing: SingleOutputMapAlgebra Int(SetNull(E:\NetMapData\app\elev_app EQ 0, E:\NetMapData\app\elev_app)) c:\temp\XSCXT #
Start Time: Thu Jun 13 10:28:32 2013
ERROR 010429: Error in GRID IO: CellLyrCreateInternal: Unable to create info directory for c:\windows\temp\ras649 .
ERROR 010302: Unable to create the output raster: C:\WINDOWS\TEMP\RAS649 Unable to create INFO directory C:\WINDOWS\TEMP\INFO
ERROR 010067: Error in executing grid expression.
Failed to execute (SingleOutputMapAlgebra).
Failed at Thu Jun 13 10:28:32 2013 (Elapsed Time: 0.00 seconds)

I looked in C:\Windows\Temp\ and it was full of hundreds of g_g### folders, and an info folder.  I deleted everything in there, and then the next time I ran my code, a new info folder was created, and everything worked just fine. So, I guess the info folder was corrupt?  I will now look for a way to purge that directory if needed, or perhaps on start-up of my add-in. 

Hope this helps someone else with this kind of problem!
0 Kudos