AV File Handle problems in iterative loops -- Avenue Coding
Phil Hurvitz
phurvitz at u.washington.edu
Tue Oct 24 22:05:55 PDT 2000
You might try another script that deletes, using a DelayedRun
request. Since there is no pattern, maybe just waiting a few seconds will
do it.
There are these strange av.ProcessAllInvals ("undocumented") and
av.PurgeObjects ("garbage collector") requests that have worked to clear
other random problems.
Also there is the Grid.CanManageDataSet that should return True if you can
delete.
-P.
******************************************************************************
Phil Hurvitz, MFR | GIS Specialist | College of Forest Resources | 355 Bloedel
Box 352100 | University of Washington, Seattle, Washington 98195-2100, USA
tel: 206.685.8179 | FAX: 206.685.3091 | e-mail: phurvitz at u.washington.edu
WWW: http://lobo.cfr.washington.edu/~phurvitz/
******************************************************************************
On Tue, 24 Oct 2000, Keven Bennett wrote:
> Hello,
>
> I'm writing Avenue code to run an iterative spatial model in
> which 6 scripts are called in a 'for' loop that iterates several
> times.
>
> 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 )
>
> end
>
> return TRUE
>
> 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
> this problem???!!!!
>
More information about the Uw-gis-l
mailing list