<?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 Create constant raster GP tool always failed in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527175#M11998</link>
    <description>&lt;P&gt;I'm having trouble getting the Create Constant Raster GP tool to work using the Pro SDK. Below is a snippet of my code. Could you help me identify what I'm doing wrong? Any assistance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;var parameters = Geoprocessing.MakeValueArray(2.6, @"C:\temp\test.tif", "FLOAT", 100.0, pEnp);&lt;/P&gt;&lt;P&gt;var cts = new CancellationTokenSource();&lt;BR /&gt;var results = await Geoprocessing.ExecuteToolAsync("CreateConstantRaster_sa", parameters, null, cts.Token,&lt;BR /&gt;(eventName, o) =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;}, GPExecuteToolFlags.None);&lt;/P&gt;</description>
    <pubDate>Mon, 26 Aug 2024 14:54:53 GMT</pubDate>
    <dc:creator>AquanuityDevelopment</dc:creator>
    <dc:date>2024-08-26T14:54:53Z</dc:date>
    <item>
      <title>Create constant raster GP tool always failed</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527175#M11998</link>
      <description>&lt;P&gt;I'm having trouble getting the Create Constant Raster GP tool to work using the Pro SDK. Below is a snippet of my code. Could you help me identify what I'm doing wrong? Any assistance would be greatly appreciated.&lt;/P&gt;&lt;P&gt;var parameters = Geoprocessing.MakeValueArray(2.6, @"C:\temp\test.tif", "FLOAT", 100.0, pEnp);&lt;/P&gt;&lt;P&gt;var cts = new CancellationTokenSource();&lt;BR /&gt;var results = await Geoprocessing.ExecuteToolAsync("CreateConstantRaster_sa", parameters, null, cts.Token,&lt;BR /&gt;(eventName, o) =&amp;gt;&lt;BR /&gt;{&lt;BR /&gt;}, GPExecuteToolFlags.None);&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 14:54:53 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527175#M11998</guid>
      <dc:creator>AquanuityDevelopment</dc:creator>
      <dc:date>2024-08-26T14:54:53Z</dc:date>
    </item>
    <item>
      <title>Re: Create constant raster GP tool always failed</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527395#M11999</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Guessing the order of parameters in a Spatial Analyst function is a great art. In your case output parameter is first. To find reason why your geoprocessing fails add few lines:&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;            var parameters = Geoprocessing.MakeValueArray(@"C:\temp\test.tif", 2.6, "FLOAT", 100.0, pEnp);

            var cts = new CancellationTokenSource();
            var results = await Geoprocessing.ExecuteToolAsync("CreateConstantRaster_sa", parameters, null, cts.Token,
            (eventName, o) =&amp;gt;
            {
                System.Diagnostics.Debug.WriteLine($@"GP event: {eventName}");
                if (eventName == "OnMessage" || eventName == "OnValidate")
                {

                    System.Diagnostics.Debug.WriteLine($@"Msg: {o}");
                }
            }, GPExecuteToolFlags.None);&lt;/LI-CODE&gt;&lt;P&gt;More info &lt;A href="https://pro.arcgis.com/en/pro-app/latest/sdk/api-reference/topic9391.html" target="_self"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Aug 2024 19:32:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527395#M11999</guid>
      <dc:creator>GKmieliauskas</dc:creator>
      <dc:date>2024-08-26T19:32:17Z</dc:date>
    </item>
    <item>
      <title>Re: Create constant raster GP tool always failed</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527595#M12000</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks a lot!&amp;nbsp; After I changed the order of the parameter, it worked like a charm!&lt;/P&gt;</description>
      <pubDate>Tue, 27 Aug 2024 02:16:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/create-constant-raster-gp-tool-always-failed/m-p/1527595#M12000</guid>
      <dc:creator>AquanuityDevelopment</dc:creator>
      <dc:date>2024-08-27T02:16:06Z</dc:date>
    </item>
  </channel>
</rss>

