thaluska

Use a number instead of a grid?

Discussion created by thaluska on Mar 7, 2011
Latest reply on Mar 8, 2011 by thaluska
Hello
I'm new to vb.net 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 vb.net/arcobjects? 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.
thanks!
tlh

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

Outcomes