Use a number instead of a grid?

Discussion created by thaluska on Mar 7, 2011
Latest reply on Mar 8, 2011 by thaluska
I'm new to and arcobjects. At the ArcInfo-Grid prompt we used to be able to use numbers in our grid functions like: outputgrid = grid1 - 401.37
Can we still do this in What I would like to do is subtract a number (stored in variable named dblLStage in code below) from a grid.  Is this possible? The way I have it coded below results in error: "Value of type 'double" cannot be converted to "ESRI.ArcGIS.GEodatabase.IGeodataset'.
any help is appreciated.

Dim pRasterDataset As IRasterDataset = pWS.OpenRasterDataset(strParcelGridName)
Dim pRLayer2 As IRasterLayer = New RasterLayer
Dim pMathOp As IMathOp = New RasterMathOps
Dim pDepthGrid As IGeoDataset = pMathOp.Minus(pRLayer2, dblLStage)