AV File Handle problems in iterative loops -- Avenue Coding
kbenet at u.washington.edu
Tue Oct 24 21:42:58 PDT 2000
I'm writing Avenue code to run an iterative spatial model in
which 6 scripts are called in a 'for' loop that iterates several
In the course of doing the needed grid algebra, each script
generates numerous temporary grids that I am having
difficulty getting rid of. The "temporary dataset" status of
these grids does not help here as they are not deleted until
the entire for loop is completed and the main script ends.
This results in the loss of about a gig of disk space per year of
iteration and I need to get rid of the temporary datasets just
before each called scrpt returns contol to the main script.
Forcing a delete using this method results in occasional "Not
Owner of Directory" errors (I'm running this as administrator
and at the end of the SAME script in which the grids are
created (a sample snippet below).
'***create aGrid by map calculation
aSrcName = aGrid.GetSrcName
aFileName = aSrcName.AsFileName
'***more grid algebra processes
'***last non-cleanup, active line of script is here
if ( File.Exists( aFileName ) ) then
Grid.DeleteDataSet( aFileName )
I have had nothing but problems with AV file handling
problems and cant find a pattern to these error messages!
Does anyone have any idea of a sure fire way to get around
More information about the Uw-gis-l