<?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 Why am I getting the error, &amp;quot;The function evaluated requires all thread to run&amp;quot;? in ArcGIS Pro SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/why-am-i-getting-the-error-quot-the-function/m-p/1432461#M11509</link>
    <description>&lt;P&gt;I am trying to rerun a script that I ran previously successfully, but now, I keep getting the error,&amp;nbsp;"The function evaluated requires all thread to run" at the "management.AddIndex" method. There is probably a better way of writing the geoprocessing methods below, but I am relatively new at creating Add-In using the ArcGIS Pro SDK v2.8. Please see the script below:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;
                var args2 = Geoprocessing.MakeValueArray(filePath, outGDB, fieldTable);
                GPRun("conversion.TableToTable", args2);

                //Create index to the field table - Error occurs here
                var ipara = Geoprocessing.MakeValueArray(fieldTable, "mukey", "tableIndex");
                GPRun("management.AddIndex", ipara);

         public async void GPRun(string GPTool, IReadOnlyList&amp;lt;string&amp;gt; parameters)
        {
            var gp_result = await Geoprocessing.ExecuteToolAsync(GPTool, parameters);
            if (gp_result.IsFailed)
            {
                if (gp_result.Messages.Count() != 0)
                {
                    Geoprocessing.ShowMessageBox(gp_result.Messages, "GP Messages", gp_result.IsFailed ? GPMessageBoxStyle.Error : GPMessageBoxStyle.Default);
                }
                else
                {
                    MessageBox.Show("Error in running the Geoprocessing Tool: " + GPTool + ", please check parameters.", "Geoprocessing Error");
                }
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks for your help!&lt;/P&gt;</description>
    <pubDate>Fri, 10 May 2024 16:10:01 GMT</pubDate>
    <dc:creator>tzz_12</dc:creator>
    <dc:date>2024-05-10T16:10:01Z</dc:date>
    <item>
      <title>Why am I getting the error, "The function evaluated requires all thread to run"?</title>
      <link>https://community.esri.com/t5/arcgis-pro-sdk-questions/why-am-i-getting-the-error-quot-the-function/m-p/1432461#M11509</link>
      <description>&lt;P&gt;I am trying to rerun a script that I ran previously successfully, but now, I keep getting the error,&amp;nbsp;"The function evaluated requires all thread to run" at the "management.AddIndex" method. There is probably a better way of writing the geoprocessing methods below, but I am relatively new at creating Add-In using the ArcGIS Pro SDK v2.8. Please see the script below:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;
                var args2 = Geoprocessing.MakeValueArray(filePath, outGDB, fieldTable);
                GPRun("conversion.TableToTable", args2);

                //Create index to the field table - Error occurs here
                var ipara = Geoprocessing.MakeValueArray(fieldTable, "mukey", "tableIndex");
                GPRun("management.AddIndex", ipara);

         public async void GPRun(string GPTool, IReadOnlyList&amp;lt;string&amp;gt; parameters)
        {
            var gp_result = await Geoprocessing.ExecuteToolAsync(GPTool, parameters);
            if (gp_result.IsFailed)
            {
                if (gp_result.Messages.Count() != 0)
                {
                    Geoprocessing.ShowMessageBox(gp_result.Messages, "GP Messages", gp_result.IsFailed ? GPMessageBoxStyle.Error : GPMessageBoxStyle.Default);
                }
                else
                {
                    MessageBox.Show("Error in running the Geoprocessing Tool: " + GPTool + ", please check parameters.", "Geoprocessing Error");
                }
            }
        }&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Thanks for your help!&lt;/P&gt;</description>
      <pubDate>Fri, 10 May 2024 16:10:01 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-sdk-questions/why-am-i-getting-the-error-quot-the-function/m-p/1432461#M11509</guid>
      <dc:creator>tzz_12</dc:creator>
      <dc:date>2024-05-10T16:10:01Z</dc:date>
    </item>
  </channel>
</rss>

