<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic IRasterMakerOp.MakeConstant method in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/irastermakerop-makeconstant-method/m-p/685846#M18439</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I attempted to use this code to create a grid from a constant (4137.37). I have inserted a MsgBox in the snippet where I get an error.&amp;nbsp; The error message is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone tell me what I am doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tlh&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'make stagegrid using IRasterMakerOp.MakeConstant method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'StageMeters is a variable containing the value of 4137.37&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pRMakerOp As ESRI.ArcGIS.GeoAnalyst.IRasterMakerOp = New RasterMakerOp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pStageGrid As IGeoDataset = pRMakerOp.MakeConstant(StageMeters, False)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pLayerStage As IRasterLayer = New RasterLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MsgBox("Code is good up to here")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pLayerStage.CreateFromRaster(pStageGrid)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pLayerStage.Name = "StageGrid"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pMap.AddLayer(pStageGrid)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pMxDoc.ActiveView.Refresh()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Mar 2011 16:58:19 GMT</pubDate>
    <dc:creator>TanaHaluska</dc:creator>
    <dc:date>2011-03-09T16:58:19Z</dc:date>
    <item>
      <title>IRasterMakerOp.MakeConstant method</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/irastermakerop-makeconstant-method/m-p/685846#M18439</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I attempted to use this code to create a grid from a constant (4137.37). I have inserted a MsgBox in the snippet where I get an error.&amp;nbsp; The error message is:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Error HRESULT E_FAIL has been returned from a call to a COM component.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Can anyone tell me what I am doing wrong?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;tlh&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;'make stagegrid using IRasterMakerOp.MakeConstant method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;'StageMeters is a variable containing the value of 4137.37&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pRMakerOp As ESRI.ArcGIS.GeoAnalyst.IRasterMakerOp = New RasterMakerOp&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pStageGrid As IGeoDataset = pRMakerOp.MakeConstant(StageMeters, False)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Dim pLayerStage As IRasterLayer = New RasterLayer&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MsgBox("Code is good up to here")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pLayerStage.CreateFromRaster(pStageGrid)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pLayerStage.Name = "StageGrid"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pMap.AddLayer(pStageGrid)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;pMxDoc.ActiveView.Refresh()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Mar 2011 16:58:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/irastermakerop-makeconstant-method/m-p/685846#M18439</guid>
      <dc:creator>TanaHaluska</dc:creator>
      <dc:date>2011-03-09T16:58:19Z</dc:date>
    </item>
  </channel>
</rss>

