Select to view content in your preferred language

Changing raster cell size in VBScript

481
0
05-05-2010 01:01 PM
KyleGallagher
Regular Contributor
I have a script where I need to take the cell size of the first raster input, run functions, then take that cell size and multiply it by 3 and run more functions.

In VBScript, the cell size can be set to MAXOF, MINOF, or a value.  Is there a way I could set it to "MAXOF" and then somehow determine the value of "MAXOF" and multiply it by 3?  The problem here is that "MAXOF" is a String, but somehow the script knows the actual double value based on the first raster input.

This code doesn't work in VBScript but hopefully gives a idea of what I'm trying to do:

gp.cellSize = "MAXOF"
cellSize = cDbl(gp.cellSize)
cellSize3 = cellSize * 3

Any thoughts?

Thanks,
Kyle
0 Kudos
0 Replies